-------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  /Users/Wei/Dropbox/Fertility/Results/Figures.log
  log type:  text
 opened on:  21 Jan 2020, 10:39:23

. 
. * Figure 1, Figure 2, Figure 3; 
. * Figure C1, Figure C2 and Figure C3. Figure C6 
. 
. ******* *Figure 1 *******
. 
. use "$path2/marr_policy", clear

. gen mort_rate = 100 -sur_rate if women == 1 
(6,645,526 missing values generated)

. egen fine_6_20 = rowmean(fine_age6-fine_age20)

. 
. keep if  han & age >= 25  
(902,343 observations deleted)

. keep if year_birth <= 1980 & year_birth >= 1940 
(0 observations deleted)

. 
. recode year_birth (1940/1949 = -1) (1950/1959 = 0) (1960/1969 = 1) (1970/1980 = 2), gen(period)
(10645223 differences between year_birth and period)

. tab period [aw =wt], su(senior)

  RECODE of |
 year_birth |
(r4_02:���� |                Summary of senior
   ����_��) |        Mean   Std. Dev.       Freq.        Obs.
------------+------------------------------------------------
         -1 |   .10529956    .3069391   2,768,492   2,188,499
          0 |    .1758653   .38070558   4,390,491   3,434,622
          1 |   .23413106   .42345455   4,722,227   3,498,494
          2 |   .25254381   .43447159   2,725,828   1,523,608
------------+------------------------------------------------
      Total |   .19563631   .39668975  14,607,038  10,645,223

. gen female = women

. collapse senior college work   [aw = wt], by(period female)

. 
. label define period -1 "1940-1949" 0 "1950-1959" 1 "1960-1969" 2 "1970-1980"

. label value period period 

. label var period "Birth Cohorts"

. drop work 

. 
. reshape wide senior college , i(period) j(female)
(note: j = 0 1)

Data                               long   ->   wide
-----------------------------------------------------------------------------
Number of obs.                        8   ->       4
Number of variables                   4   ->       5
j variable (2 values)            female   ->   (dropped)
xij variables:
                                 senior   ->   senior0 senior1
                                college   ->   college0 college1
-----------------------------------------------------------------------------

. 
. gr bar senior0 senior1 college0 college1, over(period) legend(order(2 1 4 3) label(1 "Men of Ha
> n (Senior high)") label(2 "Women of Han (Senior high)") label(3 "Men of Han (College)") label(4
>  "Women of Han (College)") ring(0) pos(11)) ///
>  blabel(total, format(%5.1g))  ytit("Completion rate") ylabel(0(0.05)0.35) 

.  gr export "$path4/fig_1a.eps",replace 
(file /Users/Wei/Dropbox/Fertility/Figures/fig_1a.eps written in EPS format)

. 
. 
. 
. use "$path2/marr_policy", clear

. keep if  women  & age >= 25  
(5,878,746 observations deleted)

. keep if year_birth <= 1980 & year_birth >= 1940 
(0 observations deleted)

. 
. recode year_birth (1940/1949 = -1) (1950/1959 = 0) (1960/1969 = 1) (1970/1980 = 2), gen(period)
(5668820 differences between year_birth and period)

. tab period [aw =wt], su(senior)

  RECODE of |
 year_birth |
(r4_02:���� |                Summary of senior
   ����_��) |        Mean   Std. Dev.       Freq.        Obs.
------------+------------------------------------------------
         -1 |    .0695994   .25447079   1,442,613   1,135,014
          0 |   .13057427   .33693426   2,309,942   1,797,032
          1 |   .19156912   .39353586   2,561,394   1,879,743
          2 |   .22398822    .4169145   1,557,948     857,031
------------+------------------------------------------------
      Total |   .15773453   .36449194   7,871,897   5,668,820

. 
. collapse senior college    [aw = wt], by(period han)

. reshape wide senior college  , i(period) j(han)
(note: j = 0 1)

Data                               long   ->   wide
-----------------------------------------------------------------------------
Number of obs.                        8   ->       4
Number of variables                   4   ->       5
j variable (2 values)               han   ->   (dropped)
xij variables:
                                 senior   ->   senior0 senior1
                                college   ->   college0 college1
-----------------------------------------------------------------------------

. label define period -1 "1940-1949" 0 "1950-1959" 1 "1960-1969" 2 "1970-1980"

. label value period period 

. label var period "Birth Cohorts"

. gr bar  senior0 senior1  college0 college1  , over(period) legend(order(2 1 4 3) label(1 "Women
>  of Minorities (Senior high)") label(2 "Women of Han (Senior high)") label(3 "Women of Minoriti
> es (College)") label(4 "Women of Han (College)")  ring(0) pos(11) size(small)) ///
>  blabel(total, format(%5.1g))  ytit("Completion rate")  ylabel(0(0.1)0.3)

. gr export "$path4/fig_1b.eps", as(eps) preview(on) replace
(note: file /Users/Wei/Dropbox/Fertility/Figures/fig_1b.eps not found)
(file /Users/Wei/Dropbox/Fertility/Figures/fig_1b.eps written in EPS format)

. 
. 
. 
. ***** Figure 2 *****
. 
. use "$path2/marr_policy", clear

. keep if age > 25
(456,159 observations deleted)

. gen treat = 1 if prov == 11 | prov == 13 | prov == 21 | prov == 31 | prov == 32 | prov == 33 | 
> prov == 35 |prov == 41 | prov == 42 | prov == 43 |prov == 44 | prov == 45| prov == 46| prov == 
> 53| prov == 64 | prov == 65
(4,950,450 missing values generated)

. replace treat = 0 if mi(treat)
(4,950,450 real changes made)

. drop if treat == . 
(0 observations deleted)

. keep if year == 2005 & women == 1 
(10,375,301 observations deleted)

. gen category = 1 if han == 1 & treat == 0 
(420,411 missing values generated)

. replace category = 2 if han == 1 & treat == 1 
(351,223 real changes made)

. replace category = 3 if han == 0 
(69,188 real changes made)

. replace high_occ = 0 if high_occ == . 
(219,352 real changes made)

. 
. foreach var in "senior" "college" "late_marr" "high_occ"{
  2. cap gen se_`var' = . 
  3. reg `var' treat##i.year_birth if han == 1, cluster(prov)
  4. forvalues i = 1941(1)1979{
  5. replace se_`var' = _se[1.treat#`i'.year_birth] if year_birth == `i'
  6. }
  7. }

Linear regression                               Number of obs     =    646,918
                                                F(28, 30)         =          .
                                                Prob > F          =          .
                                                R-squared         =     0.0354
                                                Root MSE          =     .38256

                                      (Std. Err. adjusted for 31 clusters in prov)
----------------------------------------------------------------------------------
                 |               Robust
          senior |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-----------------+----------------------------------------------------------------
         1.treat |   .0133881   .0222544     0.60   0.552    -.0320613    .0588376
                 |
      year_birth |
           1941  |   .0128199   .0081381     1.58   0.126    -.0038004    .0294402
           1942  |   .0096421   .0064758     1.49   0.147    -.0035833    .0228675
           1943  |   .0005248   .0059872     0.09   0.931    -.0117027    .0127522
           1944  |  -.0003153   .0053559    -0.06   0.953    -.0112536    .0106229
           1945  |  -.0011714   .0081254    -0.14   0.886    -.0177657    .0154229
           1946  |  -.0046926   .0061039    -0.77   0.448    -.0171584    .0077733
           1947  |   .0000252   .0112214     0.00   0.998    -.0228919    .0229424
           1948  |   .0027306    .007235     0.38   0.709    -.0120453    .0175064
           1949  |  -.0033284   .0066959    -0.50   0.623    -.0170033    .0103465
           1950  |  -.0019429   .0076409    -0.25   0.801    -.0175478    .0136619
           1951  |   .0013076   .0056467     0.23   0.818    -.0102244    .0128396
           1952  |  -.0004597   .0068936    -0.07   0.947    -.0145382    .0136188
           1953  |   .0164287   .0075698     2.17   0.038     .0009691    .0318882
           1954  |   .0442596   .0113735     3.89   0.001     .0210319    .0674873
           1955  |   .0624258   .0115572     5.40   0.000     .0388228    .0860288
           1956  |   .0870201   .0133501     6.52   0.000     .0597556    .1142847
           1957  |   .1144671   .0141347     8.10   0.000     .0856003    .1433339
           1958  |   .1441199   .0172241     8.37   0.000     .1089436    .1792963
           1959  |    .176766   .0176791    10.00   0.000     .1406605    .2128715
           1960  |   .1870682   .0214162     8.73   0.000     .1433304     .230806
           1961  |   .1788607   .0260996     6.85   0.000     .1255583    .2321632
           1962  |   .1693531   .0236907     7.15   0.000     .1209703    .2177359
           1963  |   .1535243     .01919     8.00   0.000     .1143331    .1927154
           1964  |   .1390163   .0142098     9.78   0.000      .109996    .1680365
           1965  |   .1036912   .0121396     8.54   0.000     .0788988    .1284836
           1966  |   .0962504    .013735     7.01   0.000     .0681998     .124301
           1967  |    .085733    .011136     7.70   0.000     .0629903    .1084758
           1968  |   .1062904   .0131127     8.11   0.000     .0795107      .13307
           1969  |   .1101924   .0099985    11.02   0.000     .0897726    .1306121
           1970  |   .1108597   .0105573    10.50   0.000     .0892988    .1324206
           1971  |   .1202317   .0102882    11.69   0.000     .0992204    .1412431
           1972  |   .1314407   .0092065    14.28   0.000     .1126385    .1502428
           1973  |   .1444382   .0094554    15.28   0.000     .1251277    .1637487
           1974  |   .1446263   .0106162    13.62   0.000     .1229453    .1663074
           1975  |    .167901    .009461    17.75   0.000      .148579    .1872229
           1976  |   .1741725   .0092018    18.93   0.000       .15538    .1929649
           1977  |   .1970387    .014718    13.39   0.000     .1669804    .2270969
           1978  |   .2065846   .0117289    17.61   0.000      .182631    .2305382
           1979  |   .2168733    .015609    13.89   0.000     .1849954    .2487512
                 |
treat#year_birth |
         1 1941  |  -.0009255   .0095222    -0.10   0.923    -.0203725    .0185215
         1 1942  |   .0045217   .0092289     0.49   0.628    -.0143261    .0233696
         1 1943  |   .0043883   .0082245     0.53   0.598    -.0124084    .0211849
         1 1944  |    .012056   .0149258     0.81   0.426    -.0184267    .0425386
         1 1945  |    .001857   .0112092     0.17   0.870    -.0210353    .0247494
         1 1946  |   .0097009   .0084418     1.15   0.260    -.0075396    .0269415
         1 1947  |   .0042473   .0140848     0.30   0.765    -.0245176    .0330123
         1 1948  |   .0071407   .0119675     0.60   0.555    -.0173003    .0315817
         1 1949  |    .002393   .0083603     0.29   0.777    -.0146811    .0194671
         1 1950  |  -.0073472   .0117209    -0.63   0.536    -.0312844    .0165901
         1 1951  |   .0035563   .0107004     0.33   0.742    -.0182969    .0254095
         1 1952  |   .0008663   .0096948     0.09   0.929    -.0189331    .0206657
         1 1953  |   .0068428   .0119983     0.57   0.573    -.0176609    .0313465
         1 1954  |    .000487    .012663     0.04   0.970    -.0253743    .0263483
         1 1955  |    .000384   .0136943     0.03   0.978    -.0275834    .0283515
         1 1956  |   .0021356   .0185662     0.12   0.909    -.0357816    .0400528
         1 1957  |   .0044851   .0227367     0.20   0.845    -.0419494    .0509196
         1 1958  |  -.0135455   .0254976    -0.53   0.599    -.0656186    .0385276
         1 1959  |   .0048365   .0310842     0.16   0.877    -.0586459     .068319
         1 1960  |   .0157251   .0335993     0.47   0.643    -.0528938     .084344
         1 1961  |   .0275931   .0386168     0.71   0.480    -.0512729    .1064591
         1 1962  |  -.0063687   .0264424    -0.24   0.811    -.0603713    .0476339
         1 1963  |  -.0003325   .0214985    -0.02   0.988    -.0442383    .0435733
         1 1964  |  -.0193713   .0160007    -1.21   0.235    -.0520491    .0133066
         1 1965  |  -.0167195   .0142111    -1.18   0.249    -.0457424    .0123035
         1 1966  |  -.0221539    .015645    -1.42   0.167    -.0541052    .0097975
         1 1967  |  -.0117751   .0138161    -0.85   0.401    -.0399914    .0164412
         1 1968  |  -.0037894   .0160629    -0.24   0.815    -.0365942    .0290155
         1 1969  |     .00216   .0134648     0.16   0.874    -.0253389    .0296588
         1 1970  |   .0143402   .0158446     0.91   0.373    -.0180187    .0466991
         1 1971  |   .0166108   .0131475     1.26   0.216      -.01024    .0434615
         1 1972  |   .0147924   .0147565     1.00   0.324    -.0153444    .0449291
         1 1973  |   .0228363   .0189159     1.21   0.237    -.0157953    .0614678
         1 1974  |    .022831   .0181839     1.26   0.219    -.0143054    .0599674
         1 1975  |   .0238436   .0159099     1.50   0.144    -.0086489     .056336
         1 1976  |   .0417989   .0194068     2.15   0.039     .0021649     .081433
         1 1977  |   .0489833   .0215239     2.28   0.030     .0050256    .0929409
         1 1978  |   .0522485   .0225824     2.31   0.028      .006129     .098368
         1 1979  |   .0444497   .0247426     1.80   0.082    -.0060815    .0949808
                 |
           _cons |   .0719542   .0137997     5.21   0.000     .0437715    .1001369
----------------------------------------------------------------------------------
(8,194 real changes made)
(8,802 real changes made)
(8,731 real changes made)
(9,353 real changes made)
(10,618 real changes made)
(10,602 real changes made)
(11,560 real changes made)
(12,029 real changes made)
(13,911 real changes made)
(14,455 real changes made)
(14,567 real changes made)
(17,241 real changes made)
(17,678 real changes made)
(18,956 real changes made)
(18,970 real changes made)
(18,407 real changes made)
(19,312 real changes made)
(17,628 real changes made)
(13,756 real changes made)
(15,141 real changes made)
(12,748 real changes made)
(23,481 real changes made)
(27,763 real changes made)
(24,027 real changes made)
(24,873 real changes made)
(23,952 real changes made)
(22,095 real changes made)
(28,142 real changes made)
(24,995 real changes made)
(27,165 real changes made)
(24,294 real changes made)
(24,425 real changes made)
(23,256 real changes made)
(22,213 real changes made)
(20,504 real changes made)
(19,225 real changes made)
(17,350 real changes made)
(18,472 real changes made)
(18,482 real changes made)

Linear regression                               Number of obs     =    646,918
                                                F(28, 30)         =          .
                                                Prob > F          =          .
                                                R-squared         =     0.0223
                                                Root MSE          =     .23895

                                      (Std. Err. adjusted for 31 clusters in prov)
----------------------------------------------------------------------------------
                 |               Robust
         college |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-----------------+----------------------------------------------------------------
         1.treat |   .0039176   .0100782     0.39   0.700    -.0166649    .0245001
                 |
      year_birth |
           1941  |     .00001    .002948     0.00   0.997    -.0060106    .0060307
           1942  |  -.0013982    .003189    -0.44   0.664     -.007911    .0051147
           1943  |   -.003784   .0033546    -1.13   0.268    -.0106351     .003067
           1944  |  -.0046574   .0021764    -2.14   0.041    -.0091022   -.0002127
           1945  |  -.0033612   .0038446    -0.87   0.389    -.0112128    .0044905
           1946  |  -.0060275   .0029176    -2.07   0.048    -.0119859    -.000069
           1947  |  -.0055463   .0028179    -1.97   0.058    -.0113012    .0002087
           1948  |  -.0041613   .0028143    -1.48   0.150    -.0099089    .0015863
           1949  |  -.0028234   .0033212    -0.85   0.402    -.0096062    .0039594
           1950  |  -.0021069   .0033633    -0.63   0.536    -.0089756    .0047618
           1951  |   .0020684   .0032767     0.63   0.533    -.0046235    .0087603
           1952  |  -.0014458   .0027839    -0.52   0.607    -.0071313    .0042396
           1953  |   .0017148   .0032981     0.52   0.607    -.0050207    .0084504
           1954  |   .0076171   .0037645     2.02   0.052    -.0000711    .0153053
           1955  |   .0097142   .0024233     4.01   0.000     .0047652    .0146632
           1956  |   .0097009   .0036942     2.63   0.013     .0021563    .0172455
           1957  |   .0065615   .0029752     2.21   0.035     .0004853    .0126378
           1958  |   .0070098   .0029351     2.39   0.023     .0010154    .0130041
           1959  |   .0188947   .0025439     7.43   0.000     .0136995    .0240899
           1960  |   .0210008   .0028383     7.40   0.000     .0152043    .0267974
           1961  |   .0199572   .0042417     4.70   0.000     .0112945    .0286199
           1962  |   .0282007   .0040393     6.98   0.000     .0199513      .03645
           1963  |   .0285289   .0035959     7.93   0.000      .021185    .0358728
           1964  |   .0349437   .0053882     6.49   0.000     .0239396    .0459479
           1965  |   .0335315   .0052784     6.35   0.000     .0227516    .0443114
           1966  |   .0362525   .0049697     7.29   0.000     .0261031    .0464019
           1967  |   .0306607   .0053998     5.68   0.000     .0196329    .0416885
           1968  |   .0412768   .0057856     7.13   0.000     .0294611    .0530926
           1969  |   .0435375   .0044014     9.89   0.000     .0345485    .0525264
           1970  |   .0429679    .004387     9.79   0.000     .0340085    .0519273
           1971  |   .0519291   .0059039     8.80   0.000     .0398717    .0639865
           1972  |   .0572649   .0042277    13.55   0.000     .0486308     .065899
           1973  |   .0618134   .0046802    13.21   0.000     .0522552    .0713716
           1974  |   .0623046   .0059481    10.47   0.000     .0501569    .0744523
           1975  |   .0751081    .006587    11.40   0.000     .0616555    .0885606
           1976  |   .0873212   .0077881    11.21   0.000     .0714157    .1032267
           1977  |   .0968024   .0105284     9.19   0.000     .0753005    .1183044
           1978  |   .1008887   .0107224     9.41   0.000     .0789907    .1227867
           1979  |    .099933   .0115253     8.67   0.000     .0763953    .1234708
                 |
treat#year_birth |
         1 1941  |   .0043892     .00521     0.84   0.406     -.006251    .0150295
         1 1942  |   .0020865   .0041399     0.50   0.618    -.0063683    .0105413
         1 1943  |    .000132   .0050773     0.03   0.979    -.0102372    .0105013
         1 1944  |    .004241   .0049165     0.86   0.395    -.0057998    .0142817
         1 1945  |   .0088458   .0044285     2.00   0.055    -.0001983      .01789
         1 1946  |    .007895   .0039989     1.97   0.058    -.0002718    .0160619
         1 1947  |   .0015558   .0040456     0.38   0.703    -.0067063     .009818
         1 1948  |   .0024766   .0042769     0.58   0.567     -.006258    .0112111
         1 1949  |  -.0045964   .0060804    -0.76   0.456    -.0170141    .0078214
         1 1950  |  -.0036991   .0050119    -0.74   0.466    -.0139347    .0065366
         1 1951  |  -.0033108   .0063827    -0.52   0.608    -.0163461    .0097245
         1 1952  |   .0002876   .0053904     0.05   0.958     -.010721    .0112963
         1 1953  |   .0010215   .0063128     0.16   0.873    -.0118709     .013914
         1 1954  |  -.0010044   .0067711    -0.15   0.883    -.0148328     .012824
         1 1955  |  -.0092486   .0064419    -1.44   0.161    -.0224047    .0039076
         1 1956  |  -.0019692   .0072816    -0.27   0.789    -.0168402    .0129017
         1 1957  |  -.0004703   .0064099    -0.07   0.942    -.0135612    .0126205
         1 1958  |   -.002448   .0066316    -0.37   0.715    -.0159916    .0110956
         1 1959  |  -.0047461   .0073173    -0.65   0.522    -.0196901    .0101979
         1 1960  |  -.0030832   .0066961    -0.46   0.649    -.0167586    .0105921
         1 1961  |   .0055108    .007659     0.72   0.477     -.010131    .0211526
         1 1962  |  -.0031871   .0068822    -0.46   0.647    -.0172424    .0108682
         1 1963  |   .0022731   .0077271     0.29   0.771    -.0135078     .018054
         1 1964  |  -.0014301   .0083722    -0.17   0.866    -.0185285    .0156683
         1 1965  |  -.0041277   .0075494    -0.55   0.589    -.0195457    .0112903
         1 1966  |  -.0071343   .0076435    -0.93   0.358    -.0227444    .0084758
         1 1967  |   .0030487   .0075942     0.40   0.691    -.0124608    .0185582
         1 1968  |   .0076817    .008794     0.87   0.389     -.010278    .0256414
         1 1969  |    .009448   .0073167     1.29   0.206    -.0054947    .0243908
         1 1970  |   .0152518   .0067836     2.25   0.032     .0013978    .0291058
         1 1971  |   .0122986   .0080131     1.53   0.135    -.0040664    .0286635
         1 1972  |   .0141428   .0077252     1.83   0.077    -.0016342    .0299199
         1 1973  |   .0129145   .0093419     1.38   0.177    -.0061642    .0319932
         1 1974  |   .0228885   .0088985     2.57   0.015     .0047154    .0410616
         1 1975  |   .0205117   .0093028     2.20   0.035     .0015129    .0395106
         1 1976  |   .0202271   .0124449     1.63   0.115    -.0051888    .0456431
         1 1977  |   .0247724    .016882     1.47   0.153    -.0097053    .0592501
         1 1978  |   .0302814   .0169833     1.78   0.085    -.0044032     .064966
         1 1979  |   .0257726    .016931     1.52   0.138    -.0088052    .0603503
                 |
           _cons |   .0245298   .0051531     4.76   0.000     .0140059    .0350538
----------------------------------------------------------------------------------
(8,194 real changes made)
(8,802 real changes made)
(8,731 real changes made)
(9,353 real changes made)
(10,618 real changes made)
(10,602 real changes made)
(11,560 real changes made)
(12,029 real changes made)
(13,911 real changes made)
(14,455 real changes made)
(14,567 real changes made)
(17,241 real changes made)
(17,678 real changes made)
(18,956 real changes made)
(18,970 real changes made)
(18,407 real changes made)
(19,312 real changes made)
(17,628 real changes made)
(13,756 real changes made)
(15,141 real changes made)
(12,748 real changes made)
(23,481 real changes made)
(27,763 real changes made)
(24,027 real changes made)
(24,873 real changes made)
(23,952 real changes made)
(22,095 real changes made)
(28,142 real changes made)
(24,995 real changes made)
(27,165 real changes made)
(24,294 real changes made)
(24,425 real changes made)
(23,256 real changes made)
(22,213 real changes made)
(20,504 real changes made)
(19,225 real changes made)
(17,350 real changes made)
(18,472 real changes made)
(18,482 real changes made)

Linear regression                               Number of obs     =    646,918
                                                F(28, 30)         =          .
                                                Prob > F          =          .
                                                R-squared         =     0.0195
                                                Root MSE          =     .35309

                                      (Std. Err. adjusted for 31 clusters in prov)
----------------------------------------------------------------------------------
                 |               Robust
       late_marr |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-----------------+----------------------------------------------------------------
         1.treat |   .0256511   .0164515     1.56   0.129    -.0079474    .0592495
                 |
      year_birth |
           1941  |   .0040477   .0082123     0.49   0.626    -.0127241    .0208195
           1942  |    .005897   .0077807     0.76   0.454    -.0099934    .0217874
           1943  |  -.0039157   .0086332    -0.45   0.653    -.0215471    .0137158
           1944  |  -.0031766    .006713    -0.47   0.639    -.0168864    .0105333
           1945  |  -.0068307   .0077954    -0.88   0.388    -.0227511    .0090897
           1946  |  -.0003501     .00933    -0.04   0.970    -.0194046    .0187044
           1947  |   .0098968   .0149259     0.66   0.512    -.0205859    .0403796
           1948  |   .0223774   .0151637     1.48   0.150     -.008591    .0533459
           1949  |   .0448974   .0214407     2.09   0.045     .0011096    .0886852
           1950  |   .0621723   .0259926     2.39   0.023     .0090884    .1152563
           1951  |   .0709834   .0290526     2.44   0.021     .0116501    .1303168
           1952  |   .0706933   .0246432     2.87   0.007     .0203651    .1210214
           1953  |   .0888787   .0300942     2.95   0.006     .0274183    .1503392
           1954  |   .0952511   .0294829     3.23   0.003     .0350391    .1554632
           1955  |   .0724502   .0290541     2.49   0.018     .0131139    .1317865
           1956  |   .0613763   .0193707     3.17   0.004     .0218159    .1009366
           1957  |   .0440933   .0174403     2.53   0.017     .0084755    .0797112
           1958  |   .0331382   .0127824     2.59   0.015     .0070331    .0592433
           1959  |   .0320076   .0136977     2.34   0.026     .0040331    .0599821
           1960  |   .0276412   .0113482     2.44   0.021     .0044652    .0508173
           1961  |   .0154642   .0120661     1.28   0.210    -.0091781    .0401065
           1962  |   .0081705   .0069633     1.17   0.250    -.0060505    .0223914
           1963  |  -.0038202   .0056546    -0.68   0.504    -.0153684     .007728
           1964  |   .0002668   .0063819     0.04   0.967    -.0127667    .0133003
           1965  |   .0005108   .0083729     0.06   0.952    -.0165888    .0176105
           1966  |    .004353   .0092073     0.47   0.640    -.0144507    .0231568
           1967  |   .0066994   .0082668     0.81   0.424    -.0101836    .0235824
           1968  |   .0237445   .0091062     2.61   0.014     .0051472    .0423419
           1969  |   .0295946   .0111201     2.66   0.012     .0068843     .052305
           1970  |   .0399373   .0107741     3.71   0.001     .0179335     .061941
           1971  |    .043364   .0144385     3.00   0.005     .0138766    .0728515
           1972  |   .0475716   .0126705     3.75   0.001     .0216949    .0734483
           1973  |   .0560418   .0119835     4.68   0.000     .0315683    .0805153
           1974  |   .0657417   .0134022     4.91   0.000     .0383709    .0931126
           1975  |   .0727094   .0119012     6.11   0.000      .048404    .0970148
           1976  |   .0833691    .010593     7.87   0.000     .0617354    .1050028
           1977  |   .0994585   .0093786    10.60   0.000     .0803048    .1186122
           1978  |   .1040007   .0103304    10.07   0.000     .0829032    .1250982
           1979  |   .0983001   .0089819    10.94   0.000     .0799566    .1166436
                 |
treat#year_birth |
         1 1941  |   .0195429    .013115     1.49   0.147    -.0072415    .0463274
         1 1942  |   .0069935   .0095543     0.73   0.470     -.012519     .026506
         1 1943  |   .0039099   .0114896     0.34   0.736     -.019555    .0273749
         1 1944  |    .011154   .0106205     1.05   0.302     -.010536    .0328439
         1 1945  |   .0152589   .0105664     1.44   0.159    -.0063205    .0368384
         1 1946  |   .0200395   .0121598     1.65   0.110    -.0047942    .0448731
         1 1947  |   .0230254   .0181712     1.27   0.215    -.0140851    .0601359
         1 1948  |   .0275333   .0212422     1.30   0.205    -.0158491    .0709157
         1 1949  |   .0245085   .0269996     0.91   0.371    -.0306319     .079649
         1 1950  |   .0326651    .031866     1.03   0.314     -.032414    .0977442
         1 1951  |    .018169   .0352574     0.52   0.610    -.0538363    .0901742
         1 1952  |   .0465064   .0345764     1.35   0.189    -.0241081     .117121
         1 1953  |   .0393823   .0400825     0.98   0.334     -.042477    .1212417
         1 1954  |     .02572   .0381348     0.67   0.505    -.0521616    .1036016
         1 1955  |   .0245988   .0368042     0.67   0.509    -.0505654    .0997631
         1 1956  |    .027506   .0299777     0.92   0.366    -.0337165    .0887286
         1 1957  |   .0237443   .0280133     0.85   0.403    -.0334665     .080955
         1 1958  |   .0299094   .0231705     1.29   0.207     -.017411    .0772299
         1 1959  |   .0302007   .0252146     1.20   0.240    -.0212944    .0816958
         1 1960  |   .0340617   .0208423     1.63   0.113    -.0085039    .0766273
         1 1961  |    .030327   .0223657     1.36   0.185    -.0153498    .0760039
         1 1962  |   .0156165   .0135471     1.15   0.258    -.0120504    .0432835
         1 1963  |   .0215374   .0105191     2.05   0.049     .0000545    .0430203
         1 1964  |   .0207768   .0139692     1.49   0.147    -.0077522    .0493058
         1 1965  |    .021293    .015622     1.36   0.183    -.0106114    .0531975
         1 1966  |   .0156985    .015856     0.99   0.330    -.0166838    .0480808
         1 1967  |   .0264016    .016593     1.59   0.122    -.0074858     .060289
         1 1968  |   .0181458   .0172267     1.05   0.301    -.0170357    .0533274
         1 1969  |   .0346807    .018048     1.92   0.064    -.0021781    .0715396
         1 1970  |   .0349224   .0217542     1.61   0.119    -.0095057    .0793505
         1 1971  |   .0298504   .0198555     1.50   0.143       -.0107    .0704008
         1 1972  |   .0423689   .0183308     2.31   0.028     .0049325    .0798053
         1 1973  |    .044579   .0186629     2.39   0.023     .0064642    .0826937
         1 1974  |   .0411453   .0211107     1.95   0.061    -.0019685     .084259
         1 1975  |     .04551   .0190747     2.39   0.024     .0065541    .0844658
         1 1976  |   .0546283   .0216118     2.53   0.017     .0104911    .0987654
         1 1977  |   .0638938   .0259791     2.46   0.020     .0108374    .1169502
         1 1978  |   .0679621   .0290304     2.34   0.026     .0086741      .12725
         1 1979  |   .0620787   .0292834     2.12   0.042      .002274    .1218835
                 |
           _cons |   .0784955   .0093734     8.37   0.000     .0593524    .0976386
----------------------------------------------------------------------------------
(8,194 real changes made)
(8,802 real changes made)
(8,731 real changes made)
(9,353 real changes made)
(10,618 real changes made)
(10,602 real changes made)
(11,560 real changes made)
(12,029 real changes made)
(13,911 real changes made)
(14,455 real changes made)
(14,567 real changes made)
(17,241 real changes made)
(17,678 real changes made)
(18,956 real changes made)
(18,970 real changes made)
(18,407 real changes made)
(19,312 real changes made)
(17,628 real changes made)
(13,756 real changes made)
(15,141 real changes made)
(12,748 real changes made)
(23,481 real changes made)
(27,763 real changes made)
(24,027 real changes made)
(24,873 real changes made)
(23,952 real changes made)
(22,095 real changes made)
(28,142 real changes made)
(24,995 real changes made)
(27,165 real changes made)
(24,294 real changes made)
(24,425 real changes made)
(23,256 real changes made)
(22,213 real changes made)
(20,504 real changes made)
(19,225 real changes made)
(17,350 real changes made)
(18,472 real changes made)
(18,482 real changes made)

Linear regression                               Number of obs     =    646,918
                                                F(28, 30)         =          .
                                                Prob > F          =          .
                                                R-squared         =     0.0229
                                                Root MSE          =     .28799

                                      (Std. Err. adjusted for 31 clusters in prov)
----------------------------------------------------------------------------------
                 |               Robust
        high_occ |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-----------------+----------------------------------------------------------------
         1.treat |     .00371   .0036343     1.02   0.315    -.0037122    .0111321
                 |
      year_birth |
           1941  |   .0051457   .0019103     2.69   0.011     .0012444     .009047
           1942  |   .0024289   .0011685     2.08   0.046     .0000426    .0048153
           1943  |   .0047905   .0019426     2.47   0.020     .0008231    .0087579
           1944  |   .0073065   .0031347     2.33   0.027     .0009046    .0137084
           1945  |   .0068973   .0022717     3.04   0.005     .0022578    .0115368
           1946  |   .0089155   .0025982     3.43   0.002     .0036093    .0142217
           1947  |   .0099731   .0023043     4.33   0.000      .005267    .0146791
           1948  |   .0141416   .0024074     5.87   0.000      .009225    .0190581
           1949  |   .0152535   .0032575     4.68   0.000     .0086009    .0219062
           1950  |   .0216501   .0036778     5.89   0.000     .0141389    .0291612
           1951  |    .032813    .005526     5.94   0.000     .0215275    .0440986
           1952  |   .0350449   .0060497     5.79   0.000     .0226898       .0474
           1953  |   .0435647   .0069131     6.30   0.000     .0294462    .0576833
           1954  |   .0495304    .007417     6.68   0.000      .034383    .0646779
           1955  |   .0593283   .0109934     5.40   0.000     .0368767    .0817798
           1956  |   .0742925   .0099902     7.44   0.000     .0538898    .0946952
           1957  |   .0761479   .0086189     8.84   0.000     .0585458      .09375
           1958  |   .0848795   .0100096     8.48   0.000     .0644372    .1053219
           1959  |   .0956963   .0131312     7.29   0.000     .0688788    .1225138
           1960  |   .0921582   .0102247     9.01   0.000     .0712766    .1130398
           1961  |    .092152   .0175781     5.24   0.000     .0562528    .1280512
           1962  |   .1028292   .0137889     7.46   0.000     .0746684    .1309899
           1963  |   .0992994   .0115007     8.63   0.000      .075812    .1227869
           1964  |   .1031485   .0122865     8.40   0.000     .0780561    .1282409
           1965  |   .0885577   .0094524     9.37   0.000     .0692533    .1078621
           1966  |   .0991628   .0115217     8.61   0.000     .0756324    .1226932
           1967  |    .083248   .0101586     8.19   0.000     .0625014    .1039946
           1968  |   .0980964   .0097886    10.02   0.000     .0781054    .1180873
           1969  |   .0952239   .0113088     8.42   0.000     .0721283    .1183195
           1970  |    .098556   .0103271     9.54   0.000     .0774653    .1196468
           1971  |   .1047369   .0116642     8.98   0.000     .0809154    .1285583
           1972  |   .1050314   .0099736    10.53   0.000     .0846626    .1254001
           1973  |   .1052563   .0088617    11.88   0.000     .0871582    .1233544
           1974  |   .1050859   .0099763    10.53   0.000     .0847116    .1254602
           1975  |   .1137898    .008255    13.78   0.000     .0969308    .1306488
           1976  |   .1205342    .009647    12.49   0.000     .1008323    .1402361
           1977  |   .1295212    .011863    10.92   0.000     .1052938    .1537485
           1978  |   .1228594   .0114819    10.70   0.000     .0994103    .1463085
           1979  |   .1257644   .0132034     9.53   0.000     .0987994    .1527294
                 |
treat#year_birth |
         1 1941  |  -.0044006   .0023707    -1.86   0.073    -.0092421    .0004409
         1 1942  |    .000015   .0017973     0.01   0.993    -.0036557    .0036856
         1 1943  |   .0004298   .0027448     0.16   0.877    -.0051759    .0060354
         1 1944  |  -.0011987   .0033163    -0.36   0.720    -.0079714    .0055741
         1 1945  |   .0019057   .0026335     0.72   0.475    -.0034727    .0072841
         1 1946  |   .0005484   .0041814     0.13   0.897    -.0079911    .0090879
         1 1947  |    .001125   .0032913     0.34   0.735    -.0055966    .0078467
         1 1948  |  -.0032305   .0034957    -0.92   0.363    -.0103698    .0039087
         1 1949  |    .000019   .0036978     0.01   0.996    -.0075328    .0075708
         1 1950  |  -.0027995   .0049352    -0.57   0.575    -.0128785    .0072795
         1 1951  |   .0037017   .0070427     0.53   0.603    -.0106814    .0180849
         1 1952  |   .0074617   .0078579     0.95   0.350    -.0085862    .0235097
         1 1953  |   .0079944   .0079281     1.01   0.321     -.008197    .0241858
         1 1954  |    .010173   .0101763     1.00   0.325    -.0106098    .0309558
         1 1955  |    .003902     .01301     0.30   0.766    -.0226679     .030472
         1 1956  |   .0069943   .0135924     0.51   0.611    -.0207651    .0347537
         1 1957  |   .0081783   .0122678     0.67   0.510    -.0168758    .0332324
         1 1958  |   .0012567   .0121001     0.10   0.918     -.023455    .0259684
         1 1959  |  -.0011014   .0152566    -0.07   0.943    -.0322595    .0300566
         1 1960  |   .0145233   .0136948     1.06   0.297    -.0134452    .0424919
         1 1961  |   .0200356   .0226074     0.89   0.383    -.0261349    .0662061
         1 1962  |   .0036583   .0161738     0.23   0.823     -.029373    .0366897
         1 1963  |   .0117209   .0152476     0.77   0.448    -.0194189    .0428607
         1 1964  |   .0034977   .0142594     0.25   0.808    -.0256239    .0326194
         1 1965  |   .0179011   .0125965     1.42   0.166    -.0078243    .0436265
         1 1966  |   -.002687   .0137232    -0.20   0.846    -.0307135    .0253395
         1 1967  |   .0171099   .0135836     1.26   0.218    -.0106315    .0448513
         1 1968  |   .0145233   .0145269     1.00   0.325    -.0151446    .0441912
         1 1969  |   .0195059   .0151088     1.29   0.207    -.0113503    .0503621
         1 1970  |   .0225105   .0146632     1.54   0.135    -.0074358    .0524569
         1 1971  |    .021835   .0149142     1.46   0.154    -.0086238    .0522938
         1 1972  |   .0226398   .0151758     1.49   0.146    -.0083533     .053633
         1 1973  |   .0238534   .0144564     1.65   0.109    -.0056705    .0533772
         1 1974  |   .0328065   .0131373     2.50   0.018     .0059766    .0596364
         1 1975  |   .0293723   .0142766     2.06   0.048     .0002156    .0585291
         1 1976  |   .0290015   .0154924     1.87   0.071    -.0026382    .0606412
         1 1977  |   .0292848   .0197214     1.48   0.148    -.0109918    .0695614
         1 1978  |   .0477571   .0188133     2.54   0.017     .0093354    .0861789
         1 1979  |   .0410156    .021221     1.93   0.063    -.0023234    .0843547
                 |
           _cons |   .0054511   .0015618     3.49   0.002     .0022615    .0086406
----------------------------------------------------------------------------------
(8,194 real changes made)
(8,802 real changes made)
(8,731 real changes made)
(9,353 real changes made)
(10,618 real changes made)
(10,602 real changes made)
(11,560 real changes made)
(12,029 real changes made)
(13,911 real changes made)
(14,455 real changes made)
(14,567 real changes made)
(17,241 real changes made)
(17,678 real changes made)
(18,956 real changes made)
(18,970 real changes made)
(18,407 real changes made)
(19,312 real changes made)
(17,628 real changes made)
(13,756 real changes made)
(15,141 real changes made)
(12,748 real changes made)
(23,481 real changes made)
(27,763 real changes made)
(24,027 real changes made)
(24,873 real changes made)
(23,952 real changes made)
(22,095 real changes made)
(28,142 real changes made)
(24,995 real changes made)
(27,165 real changes made)
(24,294 real changes made)
(24,425 real changes made)
(23,256 real changes made)
(22,213 real changes made)
(20,504 real changes made)
(19,225 real changes made)
(17,350 real changes made)
(18,472 real changes made)
(18,482 real changes made)

. 
. collapse senior college late_marr high_occ se_*, by(year_birth category)

. reshape wide senior college late_marr high_occ se_*, i(year_birth) j(category)
(note: j = 1 2 3)

Data                               long   ->   wide
-----------------------------------------------------------------------------
Number of obs.                      120   ->      40
Number of variables                  10   ->      25
j variable (3 values)          category   ->   (dropped)
xij variables:
                                 senior   ->   senior1 senior2 senior3
                                college   ->   college1 college2 college3
                              late_marr   ->   late_marr1 late_marr2 late_marr3
                               high_occ   ->   high_occ1 high_occ2 high_occ3
                              se_senior   ->   se_senior1 se_senior2 se_senior3
                             se_college   ->   se_college1 se_college2 se_college3
                           se_late_marr   ->   se_late_marr1 se_late_marr2 se_late_marr3
                            se_high_occ   ->   se_high_occ1 se_high_occ2 se_high_occ3
-----------------------------------------------------------------------------

. 
. foreach var in "senior" "college" "late_marr" "high_occ"{
  2. cap drop `var'_diff up_`var' low_`var'
  3. cap gen `var'_diff = `var'2 - `var'1
  4. cap gen up_`var' = `var'_diff + 1.64*se_`var'1
  5. cap gen low_`var' = `var'_diff - 1.64*se_`var'1
  6. }

. 
. tw (con senior1 senior2 year_birth, xtit("Birth cohort") ytit("Senior high school completion ra
> te") m(O D)) (line senior_diff year, lp(dash)  lc(blue) lw(thick)  ///
> legend(order(2 1 3) lab(1 "Provinces w/o fines increase in 1989-1995") lab(2 "Provinces w/ fine
> s increase in 1989-1995") lab(3 "Difference") ///
> size(small) pos(11) ring(0) col(1)) ylabel(0(0.1)0.4, grid) m(O D) xline(1959 1969, lp(dash)) t
> ext(0.12 1959 "Aged 20"" in 1979") text(0.1 1969 "Aged 20"" in 1989")) ///
> (line up_senior low_senior year, lp(shortdash shortdash) lc(blue blue))

. gr export "$path4/fig_2a.eps",replace 
(file /Users/Wei/Dropbox/Fertility/Figures/fig_2a.eps written in EPS format)

. 
. 
. tw (con college1 college2 year_birth, xtit("Birth cohort") ytit("College completion rate") m(O 
> D)) (line college_diff year, lp(dash) lc(blue)  lw(thick)  ///
> legend(order(2 1 3) lab(1 "Provinces w/o fines increase in 1989-1995") lab(2 "Provinces w/ fine
> s increase in 1989-1995") lab(3 "Difference") ///
> size(small) pos(11) ring(0) col(1)) ylabel(0(0.04)0.16, grid) m(O D) xline(1959 1969, lp(dash))
>  text(0.1 1959 "Aged 20 ""in 1979") text(0.12 1969 "Aged 20"" in 1989")) ///
> (line up_college low_college year, lp(shortdash shortdash) lc(blue blue))

. gr export "$path4/fig_2b.eps",replace 
(file /Users/Wei/Dropbox/Fertility/Figures/fig_2b.eps written in EPS format)

. 
. tw (con late_marr1 late_marr2 year, xtit("Birth cohort") ytit("Late marriage") m(O D))(line lat
> e_marr_diff year, lp(dash) lc(blue)  lw(thick) ///
> legend(order(2 1 3) lab(1 "Provinces w/o fines increase in 1989-1995") lab(2 "Provinces w/ fine
> s increase in 1989-1995") lab(3 "Difference") ///
> size(small) pos(11) ring(0) col(1)) ylabel(0(0.1)0.4, grid) m(O D) xline(1959 1969, lp(dash)) t
> ext(0.25 1959 "Aged 20 ""in 1979") text(0.25 1969 "Aged 20 ""in 1989")) ///
> (line up_late_marr low_late_marr year, lp(shortdash shortdash) lc(blue blue))

. gr export "$path4/fig_2c.eps",replace 
(file /Users/Wei/Dropbox/Fertility/Figures/fig_2c.eps written in EPS format)

. 
. 
. tw (con high_occ1 high_occ2 year, xtit("Birth cohort") ytit("White-collar job") m(O D))(line hi
> gh_occ_diff year, lp(dash) lc(blue)  lw(thick) ///
> legend(order(2 1 3) lab(1 "Provinces w/o fines increase in 1989-1995") lab(2 "Provinces w/ fine
> s increase in 1989-1995") lab(3 "Difference") ///
> size(small) pos(11) ring(0) col(1)) ylabel(0(0.05)0.25, grid)  m(O D) xline(1959 1969, lp(dash)
> ) text(0.18 1959 "Aged 20 "" in 1979") text(0.18 1969 "Aged 20"" in 1989")) ///
> (line up_high_occ low_high_occ year, lp(shortdash shortdash) lc(blue blue))

. gr export "$path4/fig_2d.eps",replace 
(file /Users/Wei/Dropbox/Fertility/Figures/fig_2d.eps written in EPS format)

. 
. 
. **** Figure 3 *** 
. 
. use  "$path2/ocp_uhs_reg", clear 

. keep if lninc_per > 7 & lninc_per <12
(7,172 observations deleted)

. keep if lnexp_per > 6.5 & lnexp_per <12
(859 observations deleted)

. keep if lnconsump_per > 6 & lnconsump_per <11.5
(187 observations deleted)

. drop if saving < -80 
(5,338 observations deleted)

. set more off

. gen head = head1 == 1 & head2 == 1

. gen female_hd = women*head

. egen female_hh = max(female_hd), by(dcode hcode prov year)

. drop female_hd

. *keep if a2 <= 2
. egen fine_8_15 = rowmean(fine_age8-fine_age15)

. egen fine_16_22 = rowmean(fine_age16-fine_age22)

. 
. egen fine_6_20 = rowmean(fine_age6-fine_age20)

. egen fine_8_22 = rowmean(fine_age8-fine_age22)

. egen fine_8_25 = rowmean(fine_age8-fine_age25)

. gen smoke_wine = smoke_share + wine_share

. 
. gl FINE_VAR_4 =  "fine_6_15 fine_16_20" 

. gl FINE_VAR_1 =  "fine_6_20" 

. 
. gl CONTROL_1 = "women#prov##c.year_birth women#year_birth#year" 

. gl CONTROL_2 = "women#prov##c.year_birth women#year_birth#year women#prov#year" 

. gl HH_STRUCTURE = "women#N_member women##c.(old_prop young_prop married female_prop)"

. egen f_p = mean(women), by(dcode hcode year)

. keep if age > 25 & age < 60 
(64,320 observations deleted)

. keep if year_birth < 1980
(11,793 observations deleted)

. g co_old = old_prop > 0 

. g co_young = young_prop > 0 

. 
. gen house_owner = house_own >= 3 & house_own <= 5 if !mi(house_own)
(1 missing value generated)

. gen food_exp = food_share - wine_share - sug_share - drink_share - resturant_share

. gen sug_drink_smoke_wine = wine_share + sug_share + drink_share 

. 
. 
. drop if han_p > 0 & han_p < 1
(12,778 observations deleted)

. 
.  
. keep if han_p == 1 & women == 1
(205,191 observations deleted)

. reghdfe saving c.($FINE_VAR_1) if han_p == 1  , a($CONTROL_1 $HH_STRUCTURE) res(sav_res)
(dropped 2 singleton observations)
(MWFE estimator converged in 8 iterations)

HDFE Linear regression                            Number of obs   =    208,252
Absorbing 4 HDFE groups                           F(   1, 207946) =      21.59
                                                  Prob > F        =     0.0000
                                                  R-squared       =     0.0534
                                                  Adj R-squared   =     0.0520
                                                  Within R-sq.    =     0.0001
                                                  Root MSE        =    24.7099

------------------------------------------------------------------------------
      saving |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
   fine_6_20 |   1.858456   .3999822     4.65   0.000     1.074501    2.642411
       _cons |   28.74041   .2141654   134.20   0.000     28.32065    29.16017
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-------------------------------------------------------------------+
               Absorbed FE | Categories  - Redundant  = Num. Coefs |
---------------------------+---------------------------------------|
                women#prov |        16           0          16     |
   women#prov#c.year_birth |        16           0          16    ?|
     women#year_birth#year |       262           1         261     |
            women#N_member |         9           1           8    ?|
                     women |         1           1           0    ?|
          women#c.old_prop |         1           0           1    ?|
        women#c.young_prop |         1           0           1    ?|
           women#c.married |         1           0           1    ?|
       women#c.female_prop |         1           0           1    ?|
-------------------------------------------------------------------+
? = number of redundant parameters may be higher

. gen sav_pre = saving - sav_res
(2 missing values generated)

. gen sav_pre_noocp = saving - sav_res - fine_6_20*_b[c.fine_6_20] 
(2 missing values generated)

. su sav_pre sav_pre_noocp

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
     sav_pre |    208,252    29.70317    5.864286    9.49693   49.94852
sav_pre_no~p |    208,252    28.74041    5.969955   8.479054   49.94852

. tab year, su(sav_pre)

            |         Summary of sav_pre
       year |        Mean   Std. Dev.       Freq.
------------+------------------------------------
       2002 |   24.921564   5.0411113      21,700
       2003 |   26.177103   5.0969853      24,355
       2004 |   27.400006   4.9814931      25,973
       2005 |   28.551138    5.040116      26,765
       2006 |   30.479727   5.1342646      26,473
       2007 |   31.532444   5.0856803      27,155
       2008 |   32.649194   4.8360655      28,901
       2009 |   34.341779   4.9798597      26,930
------------+------------------------------------
      Total |    29.70317   5.8642855     208,252

. tab year, su(sav_pre_noocp)

            |      Summary of sav_pre_noocp
       year |        Mean   Std. Dev.       Freq.
------------+------------------------------------
       2002 |   24.252106   5.0693904      21,700
       2003 |   25.409488   5.1678088      24,355
       2004 |    26.57717   5.1056058      25,973
       2005 |   27.602055   5.2378108      26,765
       2006 |   29.510519    5.353663      26,473
       2007 |   30.517132   5.3842565      27,155
       2008 |   31.464407   5.1818162      28,901
       2009 |   33.115274   5.4025819      26,930
------------+------------------------------------
      Total |   28.740413   5.9699547     208,252

. collapse sav_pre sav_pre_noocp, by(year_birth)

. keep if year_birth >= 1950
(7 observations deleted)

. su sav_pre sav_pre_noocp

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
     sav_pre |         30    29.93783    2.220309   26.83311   34.37111
sav_pre_no~p |         30    28.74341    2.316238   25.94722   32.94643

. tw con sav_pre sav_pre_noocp year_birth , legend(lab(1 "Saving rate (w/ OCP)") label(2 "Saving 
> rate (w/o OCP)") ring(0) pos(12) col(1)) ///
> xtit("Year of birth") ytit("Saving rate") m(O D) lp(solid dash) xlabel(1950(5)1980) ylabel(24(2
> )36)

. gr export "$path4/fig_3a.eps", replace
(file /Users/Wei/Dropbox/Fertility/Figures/fig_3a.eps written in EPS format)

.  
. 
. use "$path2/edu_gdp.dta", clear

. merge 1:1 country year using "$path2/TFR.dta", 

    Result                           # of obs.
    -----------------------------------------
    not matched                         1,853
        from master                     1,814  (_merge==1)
        from using                         39  (_merge==2)

    matched                             2,912  (_merge==3)
    -----------------------------------------

. drop if _merge == 2 
(39 observations deleted)

. drop _merge 

. 
. gen lngdp = ln(gdp)
(2,221 missing values generated)

. drop if mi(lngdp) 
(2,221 observations deleted)

. egen cid = group(country)

. 
. su cid 

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
         cid |      2,505    91.81756    52.62994          1        182

. local m = `r(max)'

. 
. gen k_t = .
(2,505 missing values generated)

. forvalues c= 1(1)`m'{
  2. cap reg f_t m_t if cid == `c'
  3. cap replace k = _b[m_t] if cid == `c'
  4. 
. }

. 
. gen k_s = .
(2,505 missing values generated)

. forvalues c= 1(1)`m'{
  2. cap reg f m if cid == `c'
  3. cap replace k_s = _b[m] if cid == `c'
  4. }

. 
. 
. replace country = "USA" if country == "United States of America"
(14 real changes made)

. gen gdp_2003 = gdp if year == 2003 
(2,324 missing values generated)

. egen gdp_use = max(gdp_2003), by(country)
(1 missing value generated)

. replace  lngdp = ln(gdp_use)
(2,328 real changes made, 1 to missing)

. gen ratio = f_t/m_t
(948 missing values generated)

. keep if pop > 1000 & lngdp > 6 
(1,088 observations deleted)

. 
. collapse k* gdp_use pop m* f* tfr, by(country)

. 
. label var k_t "Increase in female education/Increase in male education"

. label var m_t "Male tertiary enrollment rate"

. gen lngdp = ln(gdp_use)

. keep  if !mi(gdp_use)
(0 observations deleted)

. keep if gdp_use < 45000
(1 observation deleted)

. 
. 
. tw (scatter k_t lngdp if k_t > -2 & pop > 1000 [aw = pop], m(Oh) xlabel(6(1)11)) ///
> (lfit k_t lngdp if k_t > -2   [aw = pop], lp(dash) legend(off) xtit("ln(GDP per capita (PPP) 20
> 03)")) ///
> (scatter k_t lngdp if country == "China" | country == "India" | country == "Japan" | country ==
>  "USA", ml(country) msize(vsmall))

. gr export "$path4/fig_3b.eps",replace 
(note: file /Users/Wei/Dropbox/Fertility/Figures/fig_3b.eps not found)
(file /Users/Wei/Dropbox/Fertility/Figures/fig_3b.eps written in EPS format)

. 
. 
. 
. 
. ***** Figure C1 *****
. use "$path2/marr_policy", clear

. set more off 

. keep if year > 2000 
(10,082,197 observations deleted)

. 
. set more off 

. replace high_occ = 0 if high_occ == . & !mi(work)
(326,181 real changes made)

. drop if women == 0 
(731,010 observations deleted)

. set more off

. keep if  han & age >= 25  
(71,594 observations deleted)

. 
. keep if han == 1 
(0 observations deleted)

. gen treat = 1 if prov == 11 | prov == 13 | prov == 21 | prov == 31 | prov == 32 | prov == 33 | 
> prov == 35 |prov == 41 | prov == 42 | prov == 43 |prov == 44 | prov == 45| prov == 46| prov == 
> 53| prov == 64 | prov == 65
(302,015 missing values generated)

. replace treat = 0 if mi(treat)
(302,015 real changes made)

. drop if treat == . 
(0 observations deleted)

. gen category = 1 if han == 1 & treat == 0 
(360,750 missing values generated)

. replace category = 2 if han == 1 & treat == 1 
(360,750 real changes made)

. replace category = 3 if han == 0 
(0 real changes made)

. replace high_occ = 0 if high_occ == . 
(0 real changes made)

. replace n_birth = 0 if married_ever == 0 
(17,129 real changes made)

. collapse n_birth, by(year_birth category)

. reshape wide n_birth , i(year_birth) j(category)
(note: j = 1 2)

Data                               long   ->   wide
-----------------------------------------------------------------------------
Number of obs.                       82   ->      41
Number of variables                   3   ->       3
j variable (2 values)          category   ->   (dropped)
xij variables:
                                n_birth   ->   n_birth1 n_birth2
-----------------------------------------------------------------------------

. 
. foreach var in "n_birth"{
  2. gen `var'_diff = `var'2 - `var'1
  3. }

. tw (con n_birth1 n_birth2 year if year_birth > 1940, xtit("Birth cohort") ytit("# of births") m
> (O D)) (line n_birth_diff year, yaxis(2) ytit("Difference", axis(2)) ylabel(-0.2(0.4)1, axis(2)
> ) lp(dash) lw(thick) lc(blue) ///
> legend(order(2 1 3) lab(1 "Provinces w/o fines increase in 1989-1995") lab(2 "Provinces w/ fine
> s increase in 1989-1995") lab(3 "Difference") ///
> size(small) pos(1) ring(0) col(1)) ylabel(0(1)4, grid) ylabel(-0.4(.2).4, axis(2)) m(O D) xline
> (1959 1969, lp(dash)) text(1 1959 "Aged 20 ""in 1979") text(1 1969 "Aged 20 ""in 1989"))

. gr export "$path4/fig_c1a.eps",replace 
(note: file /Users/Wei/Dropbox/Fertility/Figures/fig_c1a.eps not found)
(file /Users/Wei/Dropbox/Fertility/Figures/fig_c1a.eps written in EPS format)

. 
. 
. use "$path2/child_gender_mort", clear 

. *keep if year >= 2000
. gen wt = 1 

. replace wt = 4 if year == 2005
(1,373,603 real changes made)

. keep if han == 1 
(865,761 observations deleted)

. keep if year_birth > 1940 & year_birth < 1980
(190,131 observations deleted)

. gen treat = 1 if prov == 11 | prov == 13 | prov == 21 | prov == 31 | prov == 32 | prov == 33 | 
> prov == 35 |prov == 41 | prov == 42 | prov == 43 |prov == 44 | prov == 45| prov == 46| prov == 
> 53| prov == 64 | prov == 65
(4,231,263 missing values generated)

. replace treat = 0 if mi(treat)
(4,231,263 real changes made)

. /*prov == 12 | prov == 14 | prov == 15  | prov == 23 | prov == 34 | prov == 37 | prov == 50 | p
> rov == 51 | prov == 52| prov == 63
> drop if treat == .
> */
. gen category = 1 if han == 1 & treat == 0 
(4,888,045 missing values generated)

. replace category = 2 if han == 1 & treat == 1 
(4,888,045 real changes made)

. replace category = 3 if han == 0 
(0 real changes made)

. gen age = year - year_birth

. reg die treat##year_birth [aw = wt], a(year)
(sum of wgt is 12,748,303)

Linear regression, absorbing indicators         Number of obs     =  9,119,308
                                                F(77, 9119228)    =     556.43
                                                Prob > F          =     0.0000
                                                R-squared         =     0.0104
                                                Adj R-squared     =     0.0104
                                                Root MSE          =     .15652

----------------------------------------------------------------------------------
             die |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-----------------+----------------------------------------------------------------
         1.treat |  -.0206252   .0006921   -29.80   0.000    -.0219817   -.0192687
                 |
      year_birth |
           1942  |  -.0046645   .0006937    -6.72   0.000    -.0060242   -.0033048
           1943  |  -.0045183   .0007013    -6.44   0.000    -.0058928   -.0031437
           1944  |  -.0078413    .000691   -11.35   0.000    -.0091956    -.006487
           1945  |  -.0129161   .0006935   -18.63   0.000    -.0142752   -.0115569
           1946  |   -.015145   .0006906   -21.93   0.000    -.0164986   -.0137914
           1947  |  -.0170388    .000685   -24.87   0.000    -.0183814   -.0156963
           1948  |  -.0202392   .0006918   -29.26   0.000    -.0215951   -.0188832
           1949  |  -.0211916   .0006648   -31.88   0.000    -.0224944   -.0198887
           1950  |  -.0250256   .0006289   -39.80   0.000    -.0262581    -.023793
           1951  |  -.0284657   .0006281   -45.32   0.000    -.0296968   -.0272347
           1952  |  -.0292418   .0006126   -47.73   0.000    -.0304425   -.0280411
           1953  |  -.0315955   .0006198   -50.98   0.000    -.0328104   -.0303807
           1954  |  -.0326755    .000622   -52.53   0.000    -.0338946   -.0314563
           1955  |  -.0354408   .0006261   -56.60   0.000     -.036668   -.0342136
           1956  |  -.0376795   .0006361   -59.23   0.000    -.0389263   -.0364327
           1957  |  -.0380551   .0006369   -59.75   0.000    -.0393033   -.0368069
           1958  |  -.0406713   .0006584   -61.77   0.000    -.0419619   -.0393808
           1959  |  -.0427271   .0007067   -60.46   0.000    -.0441122   -.0413421
           1960  |  -.0437481   .0006885   -63.54   0.000    -.0450976   -.0423986
           1961  |  -.0449076   .0007141   -62.89   0.000    -.0463071   -.0435081
           1962  |  -.0434317   .0006266   -69.32   0.000    -.0446597   -.0422037
           1963  |  -.0426473   .0006097   -69.95   0.000    -.0438423   -.0414523
           1964  |  -.0432189   .0006321   -68.37   0.000    -.0444578     -.04198
           1965  |  -.0431124   .0006388   -67.49   0.000    -.0443644   -.0418603
           1966  |  -.0432989   .0006961   -62.20   0.000    -.0446633   -.0419345
           1967  |  -.0436577   .0007194   -60.68   0.000    -.0450678   -.0422477
           1968  |  -.0438713   .0006889   -63.68   0.000    -.0452216   -.0425211
           1969  |  -.0444902   .0007186   -61.91   0.000    -.0458986   -.0430818
           1970  |  -.0448862   .0007109   -63.14   0.000    -.0462796   -.0434928
           1971  |  -.0450011   .0007411   -60.72   0.000    -.0464537   -.0435486
           1972  |  -.0432544   .0007537   -57.39   0.000    -.0447317   -.0417771
           1973  |  -.0431322    .000786   -54.88   0.000    -.0446727   -.0415916
           1974  |  -.0426984   .0008193   -52.12   0.000    -.0443042   -.0410927
           1975  |   -.043053   .0008775   -49.06   0.000    -.0447729    -.041333
           1976  |  -.0431676   .0011426   -37.78   0.000    -.0454071   -.0409282
           1977  |  -.0438956   .0012661   -34.67   0.000    -.0463771   -.0414141
           1978  |  -.0430108   .0012932   -33.26   0.000    -.0455454   -.0404761
           1979  |  -.0446715   .0013756   -32.47   0.000    -.0473676   -.0419753
                 |
treat#year_birth |
         1 1942  |   .0033614   .0009833     3.42   0.001     .0014342    .0052887
         1 1943  |   .0004269   .0009964     0.43   0.668    -.0015259    .0023798
         1 1944  |   .0020559    .000979     2.10   0.036      .000137    .0039747
         1 1945  |     .00352    .000976     3.61   0.000     .0016071     .005433
         1 1946  |   .0054035   .0009746     5.54   0.000     .0034933    .0073136
         1 1947  |   .0042318   .0009658     4.38   0.000     .0023389    .0061246
         1 1948  |   .0066308   .0009696     6.84   0.000     .0047305    .0085312
         1 1949  |   .0068645   .0009309     7.37   0.000       .00504    .0086891
         1 1950  |    .007799   .0008768     8.89   0.000     .0060805    .0095174
         1 1951  |   .0095794   .0008772    10.92   0.000     .0078602    .0112986
         1 1952  |   .0097932   .0008564    11.43   0.000     .0081146    .0114717
         1 1953  |   .0097227   .0008654    11.24   0.000     .0080266    .0114188
         1 1954  |   .0103244   .0008621    11.98   0.000     .0086347    .0120142
         1 1955  |   .0113274   .0008702    13.02   0.000     .0096218    .0130331
         1 1956  |   .0123928   .0008804    14.08   0.000     .0106672    .0141183
         1 1957  |    .013202   .0008768    15.06   0.000     .0114835    .0149206
         1 1958  |   .0137706   .0009044    15.23   0.000      .011998    .0155432
         1 1959  |   .0152938   .0009635    15.87   0.000     .0134054    .0171822
         1 1960  |   .0163449   .0009525    17.16   0.000      .014478    .0182119
         1 1961  |   .0177499   .0009825    18.07   0.000     .0158242    .0196757
         1 1962  |   .0163285   .0008646    18.88   0.000     .0146339    .0180232
         1 1963  |   .0151776   .0008449    17.96   0.000     .0135216    .0168335
         1 1964  |   .0161393   .0008754    18.44   0.000     .0144235     .017855
         1 1965  |   .0151843   .0008837    17.18   0.000     .0134523    .0169163
         1 1966  |   .0159242   .0009515    16.74   0.000     .0140594    .0177891
         1 1967  |   .0167116   .0009831    17.00   0.000     .0147849    .0186384
         1 1968  |   .0168807   .0009414    17.93   0.000     .0150356    .0187258
         1 1969  |   .0184481    .000984    18.75   0.000     .0165195    .0203767
         1 1970  |     .01871   .0009752    19.19   0.000     .0167987    .0206213
         1 1971  |   .0190222   .0010172    18.70   0.000     .0170285    .0210158
         1 1972  |   .0164334   .0010376    15.84   0.000     .0143998    .0184669
         1 1973  |   .0164502   .0010811    15.22   0.000     .0143312    .0185692
         1 1974  |   .0171415   .0011258    15.23   0.000     .0149349    .0193481
         1 1975  |   .0177273   .0012039    14.72   0.000     .0153676    .0200869
         1 1976  |   .0183948   .0015431    11.92   0.000     .0153705    .0214191
         1 1977  |   .0177228   .0016851    10.52   0.000       .01442    .0210255
         1 1978  |   .0170697   .0017235     9.90   0.000     .0136917    .0204478
         1 1979  |   .0183414   .0018292    10.03   0.000     .0147563    .0219265
                 |
           _cons |   .0633208   .0004923   128.63   0.000      .062356    .0642856
----------------------------------------------------------------------------------

. predict death_rate
(option xb assumed; fitted values)

. 
. collapse death_rate [aw = wt], by(year_birth category)

. 
. reshape wide death_rate , i(year_birth) j(category)
(note: j = 1 2)

Data                               long   ->   wide
-----------------------------------------------------------------------------
Number of obs.                       78   ->      39
Number of variables                   3   ->       3
j variable (2 values)          category   ->   (dropped)
xij variables:
                             death_rate   ->   death_rate1 death_rate2
-----------------------------------------------------------------------------

. foreach var in "death_rate"{
  2. gen `var'_diff = `var'2 - `var'1
  3. }

. tw (con death_rate1 death_rate2 year if year > 1940, xtit("Birth cohort") ytit("Child mortality
>  rate") m(O D)) (line death_rate_diff year  if year > 1940,  yaxis(2) ytit("Difference", axis(2
> )) ylabel(-0.04(0.02)0.04, axis(2)) lp(dash) lw(thick) lc(blue) ///
> legend(order(2 1 3) lab(1 "Provinces w/o fines increase in 1989-1995") lab(2 "Provinces w/ fine
> s increase in 1989-1995") lab(3 "Difference") ///
> size(small) pos(1) ring(0) col(1)) ylabel(0(0.02).06) m(O D) xline(1959 1969, lp(dash))  text(0
> .04 1959 "Aged 20 ""in 1979") text(0.04 1969 "Aged 20 ""in 1989"))

. gr export "$path4/fig_c1b.eps",replace 
(note: file /Users/Wei/Dropbox/Fertility/Figures/fig_c1b.eps not found)
(file /Users/Wei/Dropbox/Fertility/Figures/fig_c1b.eps written in EPS format)

. 
. 
. 
. use "$path2/child_edu", clear 

. keep if han_hh == 1
(945,842 observations deleted)

. gen treat = 1 if prov == 11 | prov == 13 | prov == 21 | prov == 31 | prov == 32 | prov == 33 | 
> prov == 35 |prov == 41 | prov == 42 | prov == 43 |prov == 44 | prov == 45| prov == 46| prov == 
> 53| prov == 64 | prov == 65
(2,157,722 missing values generated)

. replace treat = 0 if mi(treat)
(2,157,722 real changes made)

. drop if treat == .
(0 observations deleted)

. 
. gen category = 1 if han == 1 & treat == 0 
(2,646,038 missing values generated)

. replace category = 2 if han == 1 & treat == 1 
(2,646,038 real changes made)

. replace category = 3 if han == 0 
(0 real changes made)

. reg elig_edu treat##m_birth_year i.year [aw = wt], a(  age )
(sum of wgt is 2,944,683)

Linear regression, absorbing indicators         Number of obs     =  2,641,038
                                                F(84, 2640944)    =    3016.07
                                                Prob > F          =     0.0000
                                                R-squared         =     0.4815
                                                Adj R-squared     =     0.4815
                                                Root MSE          =     .32504

------------------------------------------------------------------------------------
          elig_edu |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------------+----------------------------------------------------------------
           1.treat |  -.0104418   .0082606    -1.26   0.206    -.0266324    .0057487
                   |
      m_birth_year |
             1941  |  -.0424322   .0079691    -5.32   0.000    -.0580513    -.026813
             1942  |  -.0511123   .0074635    -6.85   0.000    -.0657404   -.0364841
             1943  |  -.0585466   .0070943    -8.25   0.000    -.0724511   -.0446421
             1944  |  -.0868347   .0068226   -12.73   0.000    -.1002067   -.0734626
             1945  |  -.1023347    .006631   -15.43   0.000    -.1153312   -.0893383
             1946  |  -.1100375    .006522   -16.87   0.000    -.1228204   -.0972546
             1947  |  -.1118992   .0064537   -17.34   0.000    -.1245483   -.0992501
             1948  |  -.1241509   .0064399   -19.28   0.000    -.1367729   -.1115289
             1949  |  -.1328616   .0064328   -20.65   0.000    -.1454696   -.1202536
             1950  |  -.1303009   .0063971   -20.37   0.000    -.1428389   -.1177629
             1951  |  -.1446672   .0064093   -22.57   0.000    -.1572292   -.1321051
             1952  |  -.1594411   .0063794   -24.99   0.000    -.1719446   -.1469377
             1953  |  -.1620459    .006387   -25.37   0.000    -.1745643   -.1495276
             1954  |  -.1589082   .0063941   -24.85   0.000    -.1714405   -.1463759
             1955  |  -.1441912   .0064084   -22.50   0.000    -.1567516   -.1316309
             1956  |  -.1256784   .0064473   -19.49   0.000    -.1383148    -.113042
             1957  |   -.110591   .0064699   -17.09   0.000    -.1232718   -.0979102
             1958  |  -.0966402   .0064967   -14.88   0.000    -.1093735   -.0839068
             1959  |  -.0949189   .0065938   -14.40   0.000    -.1078426   -.0819952
             1960  |  -.1118943    .006585   -16.99   0.000    -.1248006    -.098988
             1961  |  -.1333315   .0066343   -20.10   0.000    -.1463344   -.1203285
             1962  |  -.1407722   .0065114   -21.62   0.000    -.1535343   -.1280102
             1963  |  -.1352557   .0064583   -20.94   0.000    -.1479138   -.1225975
             1964  |  -.1510761   .0064805   -23.31   0.000    -.1637776   -.1383746
             1965  |  -.1618985   .0064837   -24.97   0.000    -.1746064   -.1491907
             1966  |  -.1746126   .0064877   -26.91   0.000    -.1873283   -.1618969
             1967  |  -.1887645   .0065156   -28.97   0.000    -.2015348   -.1759942
             1968  |  -.1955361   .0065042   -30.06   0.000    -.2082842   -.1827881
             1969  |  -.1968437   .0065463   -30.07   0.000    -.2096742   -.1840133
             1970  |   -.204448   .0065741   -31.10   0.000    -.2173329   -.1915631
             1971  |  -.2079157   .0066603   -31.22   0.000    -.2209696   -.1948618
             1972  |  -.2216076   .0067714   -32.73   0.000    -.2348794   -.2083359
             1973  |   -.234576   .0069484   -33.76   0.000    -.2481947   -.2209573
             1974  |  -.2380174   .0072231   -32.95   0.000    -.2521744   -.2238605
             1975  |  -.2340259   .0078019   -30.00   0.000    -.2493173   -.2187346
             1976  |  -.2296019   .0085013   -27.01   0.000    -.2462641   -.2129398
             1977  |  -.2032745   .0106129   -19.15   0.000    -.2240753   -.1824736
             1978  |  -.2143572   .0140251   -15.28   0.000    -.2418458   -.1868686
             1979  |  -.2078952   .0208416    -9.98   0.000     -.248744   -.1670464
             1980  |  -.1669737   .0433863    -3.85   0.000    -.2520093   -.0819382
                   |
treat#m_birth_year |
           1 1941  |   .0511943   .0106275     4.82   0.000     .0303649    .0720238
           1 1942  |   .0397503   .0099334     4.00   0.000     .0202812    .0592194
           1 1943  |   .0302662    .009497     3.19   0.001     .0116525    .0488799
           1 1944  |   .0494714   .0091153     5.43   0.000     .0316058    .0673371
           1 1945  |   .0551461    .008863     6.22   0.000      .037775    .0725172
           1 1946  |   .0578604   .0087181     6.64   0.000     .0407732    .0749476
           1 1947  |   .0598048   .0086323     6.93   0.000     .0428857    .0767238
           1 1948  |   .0657102   .0086063     7.64   0.000     .0488422    .0825783
           1 1949  |   .0711306   .0085922     8.28   0.000     .0542901     .087971
           1 1950  |   .0486214     .00854     5.69   0.000     .0318833    .0653595
           1 1951  |   .0489165   .0085441     5.73   0.000     .0321703    .0656627
           1 1952  |   .0461521   .0084967     5.43   0.000     .0294988    .0628054
           1 1953  |   .0418735   .0084959     4.93   0.000     .0252219    .0585252
           1 1954  |   .0413939   .0084909     4.88   0.000      .024752    .0580359
           1 1955  |   .0383004   .0084969     4.51   0.000     .0216467    .0549541
           1 1956  |   .0337711   .0085398     3.95   0.000     .0170335    .0505088
           1 1957  |   .0335495   .0085532     3.92   0.000     .0167854    .0503135
           1 1958  |   .0231583   .0085763     2.70   0.007     .0063489    .0399676
           1 1959  |   .0141727   .0086911     1.63   0.103    -.0028615    .0312069
           1 1960  |   .0177514   .0086659     2.05   0.041     .0007665    .0347362
           1 1961  |   .0082269   .0087284     0.94   0.346    -.0088804    .0253343
           1 1962  |   .0051154   .0085256     0.60   0.548    -.0115944    .0218253
           1 1963  |  -.0013778   .0084472    -0.16   0.870     -.017934    .0151785
           1 1964  |  -.0024593   .0084688    -0.29   0.772     -.019058    .0141393
           1 1965  |  -.0095527    .008462    -1.13   0.259     -.026138    .0070325
           1 1966  |  -.0080568   .0084608    -0.95   0.341    -.0246396     .008526
           1 1967  |  -.0012027   .0084958    -0.14   0.887     -.017854    .0154487
           1 1968  |   .0082119   .0084697     0.97   0.332    -.0083884    .0248122
           1 1969  |   .0107467   .0085245     1.26   0.207    -.0059611    .0274545
           1 1970  |   .0078017   .0085605     0.91   0.362    -.0089765    .0245799
           1 1971  |   .0102342   .0086768     1.18   0.238    -.0067721    .0272405
           1 1972  |   .0106226    .008843     1.20   0.230    -.0067095    .0279546
           1 1973  |   .0079358   .0091034     0.87   0.383    -.0099064    .0257781
           1 1974  |   .0136212   .0095199     1.43   0.152    -.0050375    .0322798
           1 1975  |   .0072175   .0103295     0.70   0.485     -.013028     .027463
           1 1976  |   .0097528   .0115732     0.84   0.399    -.0129303    .0324358
           1 1977  |    .007751   .0143909     0.54   0.590    -.0204547    .0359567
           1 1978  |   .0157407    .019229     0.82   0.413    -.0219475    .0534288
           1 1979  |   .0015274   .0284866     0.05   0.957    -.0543053      .05736
           1 1980  |  -.0461325   .0559988    -0.82   0.410    -.1558882    .0636232
                   |
              year |
             1990  |   .1225843   .0008717   140.62   0.000     .1208758    .1242929
             2000  |   .3042935   .0013896   218.98   0.000       .30157    .3070171
             2005  |   .3666904   .0016352   224.25   0.000     .3634855    .3698953
                   |
             _cons |   .6596567   .0061844   106.66   0.000     .6475355    .6717778
------------------------------------------------------------------------------------

. predict elig_edu_pre 
(option xb assumed; fitted values)

. replace elig_edu = elig_edu_pre
(4,803,760 real changes made)

. reg educ treat##m_birth_year i.year [aw = wt], a(  age )
(sum of wgt is 2,944,683)

Linear regression, absorbing indicators         Number of obs     =  2,641,038
                                                F(84, 2640944)    =    3732.62
                                                Prob > F          =     0.0000
                                                R-squared         =     0.5356
                                                Adj R-squared     =     0.5356
                                                Root MSE          =     .38087

------------------------------------------------------------------------------------
              educ |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------------+----------------------------------------------------------------
           1.treat |  -.0078523   .0096795    -0.81   0.417    -.0268237    .0111191
                   |
      m_birth_year |
             1941  |  -.0548972   .0093378    -5.88   0.000    -.0731991   -.0365954
             1942  |  -.0643931   .0087454    -7.36   0.000    -.0815337   -.0472525
             1943  |  -.0732647   .0083128    -8.81   0.000    -.0895574    -.056972
             1944  |  -.1061884   .0079944   -13.28   0.000    -.1218572   -.0905196
             1945  |  -.1222257   .0077699   -15.73   0.000    -.1374545    -.106997
             1946  |   -.127885   .0076422   -16.73   0.000    -.1428634   -.1129066
             1947  |   -.122817   .0075622   -16.24   0.000    -.1376387   -.1079953
             1948  |  -.1250033    .007546   -16.57   0.000    -.1397932   -.1102134
             1949  |  -.1217184   .0075376   -16.15   0.000    -.1364919    -.106945
             1950  |  -.1117289   .0074958   -14.91   0.000    -.1264204   -.0970374
             1951  |  -.1239386   .0075102   -16.50   0.000    -.1386583   -.1092189
             1952  |   -.143727   .0074751   -19.23   0.000     -.158378    -.129076
             1953  |  -.1494795    .007484   -19.97   0.000    -.1641479    -.134811
             1954  |   -.148342   .0074924   -19.80   0.000    -.1630267   -.1336572
             1955  |  -.1294597   .0075091   -17.24   0.000    -.1441773    -.114742
             1956  |  -.1068101   .0075546   -14.14   0.000    -.1216169   -.0920033
             1957  |  -.0836021   .0075812   -11.03   0.000    -.0984609   -.0687433
             1958  |  -.0648243   .0076126    -8.52   0.000    -.0797448   -.0499039
             1959  |  -.0597351   .0077264    -7.73   0.000    -.0748785   -.0445917
             1960  |  -.0789087    .007716   -10.23   0.000    -.0940317   -.0637856
             1961  |  -.1083692   .0077738   -13.94   0.000    -.1236055   -.0931329
             1962  |   -.125536   .0076297   -16.45   0.000      -.14049    -.110582
             1963  |  -.1251378   .0075676   -16.54   0.000    -.1399701   -.1103055
             1964  |  -.1522986   .0075936   -20.06   0.000    -.1671817   -.1374155
             1965  |  -.1713906   .0075973   -22.56   0.000    -.1862811   -.1565002
             1966  |  -.1904436    .007602   -25.05   0.000    -.2053433   -.1755439
             1967  |  -.2126716   .0076347   -27.86   0.000    -.2276353   -.1977079
             1968  |  -.2259992   .0076214   -29.65   0.000    -.2409368   -.2110615
             1969  |  -.2355029   .0076706   -30.70   0.000    -.2505371   -.2204687
             1970  |  -.2518137   .0077032   -32.69   0.000    -.2669117   -.2367157
             1971  |  -.2634941   .0078042   -33.76   0.000    -.2787901    -.248198
             1972  |  -.2850688   .0079344   -35.93   0.000    -.3006201   -.2695176
             1973  |  -.3061532   .0081419   -37.60   0.000    -.3221111   -.2901954
             1974  |   -.316468   .0084637   -37.39   0.000    -.3330565   -.2998794
             1975  |  -.3175279   .0091419   -34.73   0.000    -.3354456   -.2996101
             1976  |  -.3184422   .0099614   -31.97   0.000    -.3379663   -.2989182
             1977  |  -.2910499   .0124357   -23.40   0.000    -.3154235   -.2666764
             1978  |  -.3022072    .016434   -18.39   0.000    -.3344172   -.2699972
             1979  |  -.3006868   .0244213   -12.31   0.000    -.3485517   -.2528219
             1980  |  -.2602964   .0508382    -5.12   0.000    -.3599375   -.1606554
                   |
treat#m_birth_year |
           1 1941  |   .0738755   .0124528     5.93   0.000     .0494684    .0982825
           1 1942  |   .0563607   .0116395     4.84   0.000     .0335477    .0791737
           1 1943  |    .050822   .0111281     4.57   0.000     .0290112    .0726327
           1 1944  |   .0706241   .0106809     6.61   0.000     .0496899    .0915584
           1 1945  |   .0762842   .0103852     7.35   0.000     .0559295    .0966389
           1 1946  |   .0818882   .0102155     8.02   0.000     .0618662    .1019102
           1 1947  |   .0818153    .010115     8.09   0.000     .0619903    .1016404
           1 1948  |   .0842675   .0100845     8.36   0.000     .0645023    .1040328
           1 1949  |   .0843481    .010068     8.38   0.000     .0646152     .104081
           1 1950  |   .0571026   .0100068     5.71   0.000     .0374895    .0767156
           1 1951  |   .0547779   .0100116     5.47   0.000     .0351554    .0744004
           1 1952  |   .0535048   .0099561     5.37   0.000     .0339912    .0730184
           1 1953  |   .0510668   .0099551     5.13   0.000     .0315551    .0705785
           1 1954  |   .0515909   .0099493     5.19   0.000     .0320906    .0710912
           1 1955  |   .0478028   .0099563     4.80   0.000     .0282887    .0673168
           1 1956  |   .0413401   .0100065     4.13   0.000     .0217276    .0609525
           1 1957  |   .0359015   .0100223     3.58   0.000     .0162581    .0555448
           1 1958  |   .0210151   .0100494     2.09   0.037     .0013186    .0407115
           1 1959  |   .0101401   .0101838     1.00   0.319    -.0098199       .0301
           1 1960  |   .0113905   .0101543     1.12   0.262    -.0085116    .0312926
           1 1961  |   .0001566   .0102276     0.02   0.988    -.0198891    .0202022
           1 1962  |  -.0022893   .0099899    -0.23   0.819    -.0218692    .0172905
           1 1963  |  -.0122725   .0098981    -1.24   0.215    -.0316724    .0071274
           1 1964  |  -.0129267   .0099234    -1.30   0.193    -.0323762    .0065229
           1 1965  |  -.0215714   .0099154    -2.18   0.030    -.0410053   -.0021375
           1 1966  |  -.0204763    .009914    -2.07   0.039    -.0399073   -.0010452
           1 1967  |  -.0128438    .009955    -1.29   0.197    -.0323552    .0066676
           1 1968  |  -.0036606   .0099244    -0.37   0.712    -.0231121     .015791
           1 1969  |   .0017347   .0099887     0.17   0.862    -.0178428    .0213122
           1 1970  |   .0005286   .0100308     0.05   0.958    -.0191314    .0201885
           1 1971  |   .0044668   .0101672     0.44   0.660    -.0154605     .024394
           1 1972  |   .0058799   .0103619     0.57   0.570    -.0144291    .0261888
           1 1973  |   .0029897   .0106669     0.28   0.779     -.017917    .0238965
           1 1974  |   .0110092    .011155     0.99   0.324    -.0108542    .0328726
           1 1975  |   .0047977   .0121037     0.40   0.692    -.0189252    .0285205
           1 1976  |   .0052258    .013561     0.39   0.700    -.0213533    .0318048
           1 1977  |   .0008064   .0168627     0.05   0.962    -.0322438    .0338567
           1 1978  |    .008204   .0225317     0.36   0.716    -.0359573    .0523654
           1 1979  |  -.0005937   .0333793    -0.02   0.986    -.0660161    .0648286
           1 1980  |  -.0483785    .065617    -0.74   0.461    -.1769856    .0802286
                   |
              year |
             1990  |   .1264438   .0010215   123.79   0.000     .1244417    .1284458
             2000  |   .3880201   .0016283   238.30   0.000     .3848287    .3912115
             2005  |   .4944925    .001916   258.08   0.000     .4907371    .4982478
                   |
             _cons |   2.089919   .0072466   288.40   0.000     2.075716    2.104122
------------------------------------------------------------------------------------

. predict educ_pre 
(option xb assumed; fitted values)

. replace educ = educ_pre
variable educ was byte now float
(4,803,760 real changes made)

. collapse elig_edu educ [aw = wt], by(m_birth_year category)

. 
. reshape wide elig_edu educ , i(m_birth_year) j(category)
(note: j = 1 2)

Data                               long   ->   wide
-----------------------------------------------------------------------------
Number of obs.                       82   ->      41
Number of variables                   4   ->       5
j variable (2 values)          category   ->   (dropped)
xij variables:
                               elig_edu   ->   elig_edu1 elig_edu2
                                   educ   ->   educ1 educ2
-----------------------------------------------------------------------------

. foreach var in "elig_edu" "educ"{
  2. gen `var'_diff = `var'2 - `var'1
  3. }

. keep if m_birth_year > 1940 & m_birth_year < 1980
(2 observations deleted)

. 
. 
. 
. tw (con educ1 educ2 m_birth_year if m_birth_year > 1940, xtit("Birth cohort") ytit("Education o
> f children") m(O D)) (line educ_diff m_birth_year  if m_birth_year > 1940, yaxis(2) ytit("Diffe
> rence", axis(2)) ylabel(-0.1(0.1)0.2, axis(2)) lp(dash) lw(thick) lc(blue) ///
> legend(order(2 1 3) lab(1 "Provinces w/o fines increase in 1989-1995") lab(2 "Provinces w/ fine
> s increase in 1989-1995") lab(3 "Difference") ///
> size(small) pos(11) ring(0) col(1)) ylabel(1.9(0.1)2.4, grid) m(O D) xline(1959 1969, lp(dash))
>   text(2 1959 "Aged 20 ""in 1979") text(2 1969 "Aged 20 in 1989"))

. gr export "$path4/fig_c1c.eps",replace 
(note: file /Users/Wei/Dropbox/Fertility/Figures/fig_c1c.eps not found)
(file /Users/Wei/Dropbox/Fertility/Figures/fig_c1c.eps written in EPS format)

. 
. 
. 
. ***** Figure C2 *****
. set more off

. set scheme s1color

. use  "$path2/ocp_uhs_reg", clear 

. 
. keep if lninc_per > 7 & lninc_per <12
(7,172 observations deleted)

. keep if lnexp_per > 6.5 & lnexp_per <12
(859 observations deleted)

. keep if lnconsump_per > 6 & lnconsump_per <11.5
(187 observations deleted)

. drop if saving < -80 
(5,338 observations deleted)

. set more off

. gen head = head1 == 1 & head2 == 1

. 
. keep if age > 25 & age < 60 & women == 1
(277,853 observations deleted)

. keep if year_birth < 1980
(6,373 observations deleted)

. g co_old = old_prop > 0 

. g co_young = young_prop > 0 

. 
. gen house_owner = house_own >= 3 & house_own <= 5 if !mi(house_own)

. gen food_exp = food_share - wine_share - sug_share - drink_share - resturant_share

. gen sug_drink_smoke_wine = wine_share + sug_share + drink_share 

. 
. drop if han_p > 0 & han_p < 1
(6,538 observations deleted)

. 
. keep if han_p == 1 
(3,318 observations deleted)

. gen treat = 1 if prov == 11 | prov == 13 | prov == 21 | prov == 31 | prov == 32 | prov == 33 | 
> prov == 35 |prov == 41 | prov == 42 | prov == 43 |prov == 44 | prov == 45| prov == 46| prov == 
> 53| prov == 64 | prov == 65
(89,909 missing values generated)

. replace treat = 0 if mi(treat)
(89,909 real changes made)

. 
. gen category = 1 if han == 1 & treat == 0 
(118,345 missing values generated)

. replace category = 2 if han == 1 & treat == 1 
(118,345 real changes made)

. replace category = 3 if han == 0 
(0 real changes made)

. collapse co_old lninc_per lnearning_per lnexp_per lnconsump_per saving, by(category year_birth)

. 
. reshape wide co_old lninc_per lnearning_per lnexp_per lnconsump_per saving, i(year_birth) j(cat
> egory)
(note: j = 1 2)

Data                               long   ->   wide
-----------------------------------------------------------------------------
Number of obs.                       74   ->      37
Number of variables                   8   ->      13
j variable (2 values)          category   ->   (dropped)
xij variables:
                                 co_old   ->   co_old1 co_old2
                              lninc_per   ->   lninc_per1 lninc_per2
                          lnearning_per   ->   lnearning_per1 lnearning_per2
                              lnexp_per   ->   lnexp_per1 lnexp_per2
                          lnconsump_per   ->   lnconsump_per1 lnconsump_per2
                                 saving   ->   saving1 saving2
-----------------------------------------------------------------------------

. foreach var in "co_old""lninc_per""lnearning_per""lnexp_per""lnconsump_per" "saving"{
  2. gen `var'_diff = `var'2 - `var'1
  3. }

. 
. 
. tw (con lninc_per1 lninc_per2 year if year > 1940, xtit("Birth cohort") ytit("Ln income /capita
> ") m(O D)) (line lninc_per_diff year  if year > 1940,  yaxis(2) ytit("Difference", axis(2)) yla
> bel(0.1(0.2)0.9, axis(2)) lp(dash) lw(thick) lc(blue) ///
>  legend(lab(1 "Provinces w/o fines increase in 1989-1995") lab(2 "Provinces w/ fines increase i
> n 1989-1995") lab(3 "Difference") ///
> size(small) pos(11) ring(0) col(1)) ylabel(8(0.5)10, grid) m(O D) xline(1959 1969, lp(dash)) te
> xt(8.6 1959 "Aged 20"" in 1979")  text(8.6 1969 "Aged 20"" in 1989"))

. gr export "$path4/fig_c2a.eps",replace 
(note: file /Users/Wei/Dropbox/Fertility/Figures/fig_c2a.eps not found)
(file /Users/Wei/Dropbox/Fertility/Figures/fig_c2a.eps written in EPS format)

. 
. 
. tw (con lnexp_per1 lnexp_per2 year if year > 1940, xtit("Birth cohort") ytit("Ln earnings /capi
> ta") m(O D)) (line lnexp_per_diff year  if year > 1940, yaxis(2) ytit("Difference", axis(2)) yl
> abel(0.1(0.2)0.9, axis(2)) lp(dash) lw(thick) lc(blue) ///
> legend(order(2 1 3) lab(1 "Provinces w/o fines increase in 1989-1995") lab(2 "Provinces w/ fine
> s increase in 1989-1995") lab(3 "Difference") ///
> size(small) pos(11) ring(0) col(1)) ylabel(8(0.5)10, grid) m(O D) xline(1959 1969, lp(dash)) te
> xt(8.6 1959 "Aged 20 ""in 1979")  text(8.6 1969 "Aged 20 ""in 1989"))

. gr export "$path4/fig_c2b.eps",replace 
(note: file /Users/Wei/Dropbox/Fertility/Figures/fig_c2b.eps not found)
(file /Users/Wei/Dropbox/Fertility/Figures/fig_c2b.eps written in EPS format)

. 
. tw (con lnconsump_per1 lnconsump_per2 year if year > 1940, xtit("Birth cohort") ytit("Ln earnin
> gs /capita") m(O D)) (line lnconsump_per_diff year  if year > 1940, yaxis(2) ytit("Difference",
>  axis(2)) ylabel(0.1(0.2)0.9, axis(2)) lp(dash) lw(thick) lc(blue) ///
> legend(order(2 1 3) lab(1 "Provinces w/o fines increase in 1989-1995") lab(2 "Provinces w/ fine
> s increase in 1989-1995") lab(3 "Difference") ///
> size(small) pos(11) ring(0) col(1)) ylabel(8(0.5)9.5, grid) m(O D) xline(1959 1969, lp(dash)) t
> ext(8.3 1959 "Aged 20 ""in 1979")  text(8.3 1969 "Aged 20 ""in 1989"))

. gr export "$path4/fig_c2c.eps",replace 
(note: file /Users/Wei/Dropbox/Fertility/Figures/fig_c2c.eps not found)
(file /Users/Wei/Dropbox/Fertility/Figures/fig_c2c.eps written in EPS format)

. 
. 
. tw (con saving1 saving2  year if year > 1940, xtit("Birth cohort") ytit("Saving rate (%)") m(O 
> D)) (line saving_diff year  if year > 1940, yaxis(2) ytit("Difference", axis(2)) ylabel(-2(4)16
> , axis(2)) lp(dash) lw(thick) lc(blue) ///
> legend(order(2 1 3) lab(1 "Provinces w/o fines increase in 1989-1995") lab(2 "Provinces w/ fine
> s increase in 1989-1995") lab(3 "Difference") ///
> size(small) pos(11) ring(0) col(1)) ylabel(20(5)40, grid) m(O D) xline(1959 1969, lp(dash)) tex
> t(34 1959 "Aged 20 ""in 1979") text(34 1969 "Aged 20 ""in 1989"))

. gr export "$path4/fig_c2d.eps",replace 
(note: file /Users/Wei/Dropbox/Fertility/Figures/fig_c2d.eps not found)
(file /Users/Wei/Dropbox/Fertility/Figures/fig_c2d.eps written in EPS format)

. 
. 
. ***** Figure C3 *****
. use "$path2/CFPS_OCP", clear 

. 
. cap gen men = 1-women

. 
. 
. replace mathtest = . if mathtest<0 
(0 real changes made)

. replace wordtest = . if wordtest<0 
(0 real changes made)

. 
. replace eduy = . if eduy >17
(0 real changes made)

. keep if women == 1  
(35,754 observations deleted)

. gen treat = 1 if prov == 11 | prov == 13 | prov == 21 | prov == 31 | prov == 32 | prov == 33 | 
> prov == 35 |prov == 41 | prov == 42 | prov == 43 |prov == 44 | prov == 45| prov == 46| prov == 
> 53| prov == 64 | prov == 65
(15,843 missing values generated)

. replace treat = 0 if mi(treat)
(15,843 real changes made)

. 
. gen category = 1 if  treat == 0 
(20,612 missing values generated)

. replace category = 2 if treat == 1 
(20,612 real changes made)

. collapse happy sat_marr sat_duty_other agree_women_marr agree_women_chid, by(category year_birt
> h)

. reshape wide happy sat_marr sat_duty_other agree_women_marr agree_women_chid, i(year_birth) j(c
> ategory)
(note: j = 1 2)

Data                               long   ->   wide
-----------------------------------------------------------------------------
Number of obs.                       82   ->      41
Number of variables                   7   ->      11
j variable (2 values)          category   ->   (dropped)
xij variables:
                                  happy   ->   happy1 happy2
                               sat_marr   ->   sat_marr1 sat_marr2
                         sat_duty_other   ->   sat_duty_other1 sat_duty_other2
                       agree_women_marr   ->   agree_women_marr1 agree_women_marr2
                       agree_women_chid   ->   agree_women_chid1 agree_women_chid2
-----------------------------------------------------------------------------

. keep if year_birth > 1940 & year_birth < 1980
(2 observations deleted)

. foreach v in "happy" "sat_marr" "sat_duty_other" "agree_women_marr" "agree_women_chid"{
  2. gen `v'_diff = `v'2 - `v'1
  3. }

. tw (con sat_marr1 sat_marr2 year if year > 1940, xtit("Birth cohort") ytit("Satisfied with marr
> aige" "(Yes = 1)") m(O D)) (line sat_marr_diff year  if year > 1940,  yaxis(2) ytit("Difference
> ", axis(2)) ylabel(-0.2(0.2)0.6, axis(2)) lp(dash) lw(thick) lc(blue) ///
> legend(order(2 1 3) lab(1 "Provinces w/o fines increase in 1989-1995") lab(2 "Provinces w/ fine
> s increase in 1989-1995") lab(3 "Difference") ///
> size(small) pos(11) ring(0) col(1)) ylabel(.6(.1)1.1) m(O D) xline(1959 1969, lp(dash)) text(.9
> 5 1959 "Aged 20"" in 1979") text(.95 1969 "Aged 20"" in 1989"))

. gr export "$path4/fig_c3a.eps", replace 
(file /Users/Wei/Dropbox/Fertility/Figures/fig_c3a.eps written in EPS format)

. 
. tw (con sat_duty_other1 sat_duty_other2 year if year > 1940, xtit("Birth cohort") ytit("Satisfi
> ed with spousal housework duty" "(Yes = 1)") m(O D)) (line sat_duty_other_diff year  if year > 
> 1940,  yaxis(2) ytit("Difference", axis(2)) ylabel(-0.2(0.2)0.6, axis(2)) lp(dash) lw(thick) lc
> (blue) ///
> legend(order(2 1 3) lab(1 "Provinces w/o fines increase in 1989-1995") lab(2 "Provinces w/ fine
> s increase in 1989-1995") lab(3 "Difference") ///
> size(small) pos(11) ring(0) col(1)) ylabel(0(.2)1) m(O D) xline(1959 1969, lp(dash)) text(.5 19
> 59 "Aged 20"" in 1979") text(.5 1969 "Aged 20"" in 1989"))

. gr export "$path4/fig_c3b.eps", replace 
(file /Users/Wei/Dropbox/Fertility/Figures/fig_c3b.eps written in EPS format)

. 
. tw (con agree_women_marr1 agree_women_marr2 year if year > 1940, xtit("Birth cohort") ytit(`"Ag
> reement with "marriage is important to women"' `"(Yes = 1)"') m(O D)) (line agree_women_marr_di
> ff year  if year > 1940,  yaxis(2) ytit("Difference", axis(2)) ylabel(-0.2(0.2)0.6, axis(2)) lp
> (dash) lw(thick) lc(blue) ///
> legend(order(2 1 3) lab(1 "Provinces w/o fines increase in 1989-1995") lab(2 "Provinces w/ fine
> s increase in 1989-1995") lab(3 "Difference") ///
> size(small) pos(11) ring(0) col(1)) ylabel(.3(.1)0.9) m(O D) xline(1959 1969, lp(dash)) text(.3
> 5 1959 "Aged 20"" in 1979") text(.35 1969 "Aged 20"" in 1989"))

. gr export "$path4/fig_c3c.eps", replace 
(file /Users/Wei/Dropbox/Fertility/Figures/fig_c3c.eps written in EPS format)

. 
. tw (con agree_women_chid1 agree_women_chid2 year if year > 1940, xtit("Birth cohort") ytit(`"Ag
> reement with "child is important to women"' `"(Yes = 1)"') m(O D)) (line agree_women_chid_diff 
> year  if year > 1940,  yaxis(2) ytit("Difference", axis(2)) ylabel(-0.2(0.2)0.6, axis(2)) lp(da
> sh) lw(thick) lc(blue) ///
> legend(order(2 1 3) lab(1 "Provinces w/o fines increase in 1989-1995") lab(2 "Provinces w/ fine
> s increase in 1989-1995") lab(3 "Difference") ///
> size(small) pos(11) ring(0) col(1)) ylabel(.5(.1)1.1) m(O D) xline(1959 1969, lp(dash)) text(.5
> 5 1959 "Aged 20"" in 1979") text(.55 1969 "Aged 20"" in 1989"))

. gr export "$path4/fig_c3d.eps", replace 
(file /Users/Wei/Dropbox/Fertility/Figures/fig_c3d.eps written in EPS format)

. 
. 
. ** Figure C6 *** 
. 
. use  "$path2/ocp_uhs_reg", clear 

. keep if lninc_per > 7 & lninc_per <12
(7,172 observations deleted)

. keep if lnexp_per > 6.5 & lnexp_per <12
(859 observations deleted)

. keep if lnconsump_per > 6 & lnconsump_per <11.5
(187 observations deleted)

. drop if saving < -80 
(5,338 observations deleted)

. set more off

. gen head = head1 == 1 & head2 == 1

. gen female_hd = women*head

. egen female_hh = max(female_hd), by(dcode hcode prov year)

. drop female_hd

. *keep if a2 <= 2
. 
. egen f_p = mean(women), by(dcode hcode year)

. keep if age > 25 & age < 60 
(64,320 observations deleted)

. keep if year_birth < 1980
(11,793 observations deleted)

. g co_old = old_prop > 0 

. g co_young = young_prop > 0 

. 
. gen house_owner = house_own >= 3 & house_own <= 5 if !mi(house_own)
(1 missing value generated)

. gen food_exp = food_share - wine_share - sug_share - drink_share - resturant_share

. gen sug_drink_smoke_wine = wine_share + sug_share + drink_share 

. 
. drop if han_p > 0 & han_p < 1
(12,778 observations deleted)

. gen run_wealth_share = run_share + wealth_in_share

. gen wealth_estate_share = estate_share + wealth_share

. gen gold_beauty = other_gold_share +other_beauty_share

. gen food_no_wine = food_share - wine_share

. gen cloth_beauty = cloth_share + other_gold + other_beauty

. gen sug_drink_wine_rest = sug_drink_smoke_wine+resturant_share

. 
. preserve

. keep if han_p == 1 & women == 1 
(205,191 observations deleted)

. 
. su sug_drink_wine_rest

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
sug_drink_~t |    208,254    .0929728    .0677733          0   .8830567

. collapse  sug_drink_wine_rest labor_share trans_in_share run_wealth_share  cons_share trans_out
> _share so_ins_share  wealth_estate_share sug_drink_smoke_wine food_exp ///
> cloth_beauty gold_beauty cloth_share other_beauty_share resturant_share wine_share long_share f
> ood_no_wine durable_share med_share trans_comm_share edu_ent_share house_share other_real

. la var labor_share "Labor earnings"

. gr pie labor_share trans_in_share run_wealth_share, plabel(_all percent, size(*1.5)  color(whit
> e) format(%9.2g)) ///
>  legend(label(1 "Labor earnings") label(2 "Transfer-in") label(3 "Business & Asset") ring(0) po
> s(1) col(1))

. gr export "$path3/fig_c6a.eps",replace 
(file /Users/Wei/Dropbox/Fertility/Results/fig_c6a.eps written in EPS format)

. 
.  gr pie cons_share trans_out_share so_ins_share  wealth_estate_share, plabel(_all percent,  col
> or(white) format(%9.2g)) ///
>  legend(label(1 "Consumption") label(2 "Transfer-out") label(3 "Social Insurance") label(4 "Ass
> et & Estate") ring(0) pos(1) col(1))

. gr export "$path3/fig_c6b.eps",replace 
(file /Users/Wei/Dropbox/Fertility/Results/fig_c6b.eps written in EPS format)

. 
.  gr pie cloth_beauty  sug_drink_wine_rest   food_exp trans_comm_share edu_ent_share long_share 
> house_share   med_share, plabel(_all percent,   color(white) size(  small )     format(%9.2g)) 
> ///
>  legend( label(1 "Clothing & beauty") label(2 "Drinks, sugar & restaurant")  label(3 "Food") la
> bel(4 "Trans. & comm.") label(5 "Educ. & entmt.") label(6 "Durables")  label(7 "Housing") label
> (8 "Medical") ///
>  pos(12) row(2) size(vsmall))

. gr export "$path3/fig_c6c.eps",replace 
(file /Users/Wei/Dropbox/Fertility/Results/fig_c6c.eps written in EPS format)

. 
. restore 

. 
. log close 
      name:  <unnamed>
       log:  /Users/Wei/Dropbox/Fertility/Results/Figures.log
  log type:  text
 closed on:  21 Jan 2020, 10:43:18
-------------------------------------------------------------------------------------------------
